Merge excel files into 1

I have multiple excel files “.xls” but I want to marge those into a new excel being each file a excel sheet of the new one named with the file name “I want to create the excel” I am using the for each excel file but is not reading anything
Thank you so much I am new Using UiPath but the tutorials in internet are not helping they make the thing so much complicated

And I am creating the new Excel With Use Excel file but is creating it in the folder where the UiPath is

@Juandix

Did you happen to assign output variable in the read range?

and for excel creation give fullpath where you want else by default it chooses current directory

cheers

Yes I am using an output this is how my folder looks
image

@Juandix

can you show some data?

can you try specifying the first cell in the range field and try

To Merge you can use merge datatable

Make sure you do Mergetable = originaltable.clone for once…for this in loop add a if condition and when loop index is 0 add the assign for cloning

cheers

All the files look like this


Can you show me how to use the merge table?

@Juandix

this is how it looks



image

Hope this helps

Sourcetable is what is assigned in read range

cheers

That will create a new sheet for each document right?

@Juandix

Do you need each sheet for one document?

This will not…this will merge all into one table and write into one sheet…

If you only need to merge sheets then use copy sheet activity directly

Cheers

All documents have one sheet only I want that each document is a sheet for the new one

@Juandix

Then please use this


cheers

Now I have this error
image

@Juandix

Please have the inner use excel which is for destination and the exce process scope outside the for loop…

So that the other file is kept open and only new files are opened as necessary

Excel process sope
Use excel for destination file
For loop
Use excel for currentfile

Cheers

Thank you so much!!!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.