5.2 Split by row - group by data - split into multiple Sheets

 

We have an order table file orders. xlsx, and part of the data is shown in the figure below. The first row contains the column titles, and the data start from the second row with one piece of data per row.

imagepng

Now we want to group the data in this table by Shippers, and store each grouped data to one separate Sheet, with the Shippers name as the Sheet name. The split results are as follows:

Ordersm.xlsx:

imagepng

imagepng

imagepng

Script:

A B
1 =T(“orders.xlsx”) =A1.group(Shippers)
2 for B1 =file(“Ordersm.xlsx”).xlsexport@ta(A2;A2.Shippers)

A1: Read the data in orders.xlsx.

B1: Group by Shippers.

A2: Loop each Shippers group.

B2: Take the Shippers name as the Sheet name, and write the grouped data in A2 to the Sheet.


esProc Desktop and Excel Processing
5.1 Split by row - by number of rows
5.3 Split by row - group by data - split into multiple files