How to copy sheet by sheet to orther file excel

Hi all,

I want to use Uipath to copy all data by each sheet to another excel file.
I do as below:

\

But when run, it show to me the error:

image

Please help to check or let me know the other way to do.

Thank all.

I think the error when i creat array of variable DataTable.
How to creat and using a variable DataClipboardDummy_v(index) above…
Thank

1 Like

@AKY Try below code it will help you. change input and output excel file paths it will work.

copyExcelAllSheets.xaml (10.1 KB)

1 Like

@AKY Get Input excel sheets into collection or Array.

That collection or array you can pass it to the read range and append the rows in Output excel

1 Like

Hi @Manjuts90,

Thank you for your support.
But it only work with file extension is xlsx.
image
I want to copy data to new file extension is xlsm.
If step session1 is ok then next to step session3 like below.


Please help me to check it.

Thank @hemanth_chinna,

But how to get input excel sheets into collection or Array.
I tried to get input to DataClipboardDummy_v(intCount_v) like above, with array of variable type DataTable.
But it show to me the error.

To get input excel sheets into List.

Refer the image for “Variable type” = Varibale name.GetSheets.ToList

Hi @hemanth_chinna,

Yes i already get name of sheets.
But tell me how to get data of each sheets to one variable.

Thank you

Hi @AKY

Please take a look.This will help you.

Regards
Balamurugan.S