-1

I am trying to create a sequence where a folder where multiple subdirectories are present, Each subdirectory has 2 Excel files with multiple sheets (Sheet1, Sheet2).

I am looking a way to merge both the Excel files from each repository wrt. to their respective sheets. For Eg: Sheet1 data needs to be merged with Sheet1, Sheet2 with Sheet2, and finally give an output Excel file containing both the sheets with merged data.

I have tried using UIPATH_ExcelMerge, BUt its not working in my case.

James Z
  • 12,209
  • 10
  • 24
  • 44
Manz
  • 593
  • 5
  • 23

1 Answers1

0

I assumed that the sheets have the same schema, so you could iterate all Excel files and for each worksheet use "Read range" to store the data into a temp data table. Then you could merge the data tables of the same worksheets together with the "Merge data table" activity. Finally, write the merged data table into the output Excel file.

Something like this: enter image description here enter image description here enter image description here

Regards, Gio

q.gio
  • 46
  • 3
  • Thanks for the answer. But In the above screen shot how you have checked for all the subdirectories in a folder. where multiple subdirectories are present in a folder , Each subdirectory has 2 Excel files with multiple sheets (Sheet1, Sheet2)., While writing the files as well you have mentioned sheet1 only but in each Excel file we have 2 sheets so in the output as well we have 2 sheets with merged data. – Manz Jun 30 '21 at 13:50
  • Schema in Sheet1 (Excel1 & Excel2) are same and Sheet2 (Excel1 & Excel2) are same. For each file group present in the subdirectories. – Manz Jun 30 '21 at 14:09