5.11 Split multi-Sheet file into multiple files - unfixed number of Sheets

 

There is a multi-Sheet file Amount.xlsx as follows:

imagepng

imagepng

imagepng

The number of Sheets is not fixed, now we need to separate each Sheet to form one file, and take the Sheet name as the file name. The results after splitting are shown as below:

Apple.xlsx:
imagepng

Bread.xlsx:
imagepng

Pork.xlsx:
imagepng

Script:

A B
1 =file(“Amounts.xlsx”).xlsopen()
2 for A1 =A1.xlsimport@t(;A2.stname)
3 =T(A2.stname+“.xlsx”,B2)