Sorry but i don’t get your point. Doesn’t result.xlsx exist in the project folder after we run the above sample? And it has all the sheet from multiple files, doesn’t it?
Hi @hacky, you want to merge all sheets into one Excel file while keeping the same sheet names, but you’re not recommending including all the data from each sheet in the new file, correct?
Excel Process Scope
----- Use Excel File (Result.xlsx)
For each file in folder (looping through all xlsx files)
----- Use Excel File (CurrentFile)
---------- Use Each Excel Sheet
--------------- Copy Sheet (CurrentSheet.Name) (file = Result.xlsx, Sheet = CurrentSheet.Name)
Conclusion:
UiPath is simply creating extra empty sheet in the Result.xlsx as Sheet2
Keep all the files from which you need to copy sheets in a single folder
Then follow below code. In the properties of copy sheet- provide the destination file path and keep sheet name same as the source sheet name as those are unique