I am trying to create a automation to copy the same range from multiple spreadsheets, and paste them into a destination excel file. For example each source spreadsheet I will be copying the data from cells A2:W2, how can I copy those ranges for multiple spreadsheets and paste them to the same destination excel file?
I highly recommend going through all the free training on the UiPath Academy web site.
Check this link out where I have already answered the question along with the flow. Hope this helps
Follow the steps
- Use excel fiel with destination file with reference as exceldest
- For each file in folder
- Use excel file with currentfile.fullname with refereence as excel
- Read range inside use excel file activity with
excel.currentsheet.Range("A2:W2")
and save output to datatable dt - Append range with dt as input and range as Exceldest.currentsheet
Cheers
In step#4, how can I save output to data table?
Thank you for your input! What ended up working for me was the following:
- Use excel file with destination file with reference as exceldest
- For each file in folder
- Use excel file with currentfile.fullname with reference as excel
- Write DataTable to Excel with what to write as excel.currentsheet.Range(“A2:W2”), Destination as the destination file
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.