Creating New Excel Files From Master Excel File

I am trying to build new excel files from a master excel file based on a column filter. Can anyone suggest the best way to do it? Just for information, I have to create up to 70 new files based on location column, Also is there a way to include dynamic names for the new files created ? I have to save a copy for every day for every location.

Thanks in Advance,
Shay

Hi @shay
Yes of course we can name by appending the timestamp like this
"yourCurrentfilename"+now.ToString(“dd_MM_yy_hh_mm_ss”)+".xlsx"
This would save the file with new name with timestamp at that instance thus make sure that new files are created for every second
Cheers @shay

1 Like

Thanks and what about best way to create multiple new files ?

Well so far i have seen this one as the reliable one, the above mentioned
Cheers @shay

I think I missed something, I am also looking for a way to create multiple new files from a master file.Will appreciate if you can guide me to find the best way to do this.

What issue you were facing buddy
Cheers @shay

I don’t know how to create new excel files from a single excel file based on a column filter criteria at a bulk level, the material I found online is just for creating 1 file but I have about 70 files to make, so is there any better way to do it or I have to repeat the same process for all the 70 filter conditions ?

@shay

As per my understanding you want to create Excel files based Excel column data. If yes then follow below steps.

  1. use Excel Application Scope Activity to read data from Excel and will give output as dataTable and name it as ‘DT’.

  2. Then use For Each Row Activity to iterate that DataTable.

ForEach row in DT
- Take Excel Application Scope Activity to
create Excel file and pass file name as:
row(“ColumnName”).Tostring+".xlsx"

For Each iteration it will create one Excel file.

1 Like

Thanks for your response, I tried this but this is only changing the name of the master file and creating a copy of the master files, What I want is to also filter the result in each file based on their location name.
Let me know if I am missing something from my side.

Regards,
Shay

1 Like

@shay

Could you please show me some input data and what output you want for better understanding. Then I can help you better in this.