How to copy sheet by sheet to orther file excel

excel

#1

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.


#2

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


#3

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

copyExcelAllSheets.xaml (10.1 KB)


#4

@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


#5

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.


#6

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.


#7

To get input excel sheets into List.

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


#8

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


#9

Hi @AKY

Please take a look.This will help you.

Regards
Balamurugan.S