I want to write rows after the last row from file previous

I want to read file excel (loop) in folder and write rows after the last row from file previous.

I have 1 file excel (original)as below.


and 1 file excel image

I want to combine 2 file in sheet10 as below.
image

Please guide me about it.

Hi @fairymemay,

First use Read Range activity https://docs.uipath.com/activities/docs/excel-read-range to read the data (e.g. DT1 and DT2) from your first two excel files.

Then use the Merge Data Table activity https://docs.uipath.com/activities/docs/merge-data-table to combine the two data tables (DT1 & DT2)

Finally, use the Write Range activity https://docs.uipath.com/activities/docs/excel-write-range to write your final DT in Sheet 10

Hope this helps.
Best regards,
Marius

@Marius_Puscasu I want to merge data column ID , Name and amount only.

Maybe the “Append Range” activity could be of some help.

Cheers

@J0ska Please guide me about use Append Range.

I have file excel 10.xlsx (8.1 KB) 11.xlsx (7.8 KB)
I want file excel follow template.xlsx (9.2 KB)

Thank you for your help.

Hi @fairymemay,

Please see the attached file fairymemay_1.xaml (5.8 KB)

And you can filter the final dataatable in order to keep the columns that you want

Hope this clarifies.
Best regards,
Marius

Well, probably the approach proposed by @Marius_Puscasu will be better:
1/ Read B-D columns from file 10.xls into data table DT1
2/ Read A-C columns from file 11.xls into data table DT2
3/ Merge both data tables DT1 and DT2
4/ Write merged data table back to excel

Cheers

1 Like

discussion continues here: