I have a “Template.xlsx” excel workbook with the right layout and formatting. I also have another workbook with all the workers data. I need to make an excel workbook for each person witht heir own data using the Template’s layout.
So my idea was to copy a template per person, fill it and save it with changing the name to a persons id. So that I’d have a folder with a bunch of workbooks for each person and the original Template.xlsx file should still be empty.
I can only find how to copy an excel sheet though, not the whole workbook.
Hi @Sasha_R
I think template and worker excel file had same headers
so if it is true
Try this way
Read the excel file having workers data and store in dt1
use for each row to loop through each row of dt1
inside the for each row do the following
use assign activity to assign like this
dt2 = dt1.Clone() where dt2 is the datatable which contains headers of dt1
use add datarow to each row to the dt2 datatable
Then after use use write range with excel file name as row(“Persnr”).ToString+“.xlsx”
and datatable dt2 into the write range
Check this workflow for reference
I had done a simmilar scenario sample_12.zip (2.9 MB)