5.3 Split by row - group by data - split into multiple files

 

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 Excel file, with the Shippers name as the file name. The split results are as follows:

Speedy Express.xlsx:

imagepng

United Package.xlsx:

imagepng

Federal Shipping.xlsx:

imagepng

Script:

A B
1 =T(“orders.xlsx”) =A1.group(Shippers)
2 for B1 =T(A2.Shippers+“.xlsx”,A2)

A1: Read the data in orders.xlsx.

B1: Group by Shippers.

A2: Loop each Shippers group.

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


esProc Desktop and Excel Processing
5.2 Split by row - group by data - split into multiple Sheets
5.4 Split by row - segment by data (by filtering condition)