Hello,
- This Excel 1This Excel 2
I want to merge these 2 Excel in Excel 1 like
How can i do this?
hello @HELZMOTH_BJ ,
Firstly, you need to find last row of excel 1 by using - dt.rowcount
then you need to use write range in excel 1 with datatable of excel 2 and give range - “A”+(dt.rowcount+1).tostring
let me know if this works.
Cheers!
If there is no logic to be checked just concat as it is, you can use below approach
Write Range
activity to write the step 1 datatable in to Excel 1 at the end cell of the range. As per screenshot, you should be providing range Q1
. Also add headers
property should be checked.Can you please provide xaml
Got you,
Here’s the Xaml containing logic as per your requirement, Let me know if it works.
BlankProcess2.zip (16.5 KB)
Below are 2 input excel
excel 1.xlsx (8.9 KB)
excel 2.xlsx (8.8 KB)
Regards.
You just need to read Excel 2 and use write range with the range as the first cell where the data needs to start in excel 1
cheers
This work but i also want to copy the 1st row of excel1 till column Service_Period until it reach empty row.
You should create other thread for this as it will be easy for other user who will see this post in future.
Assumption:
Variables:
dtMerged | Datatype: DataTable
Flow:
(From d1 in dt1.AsEnumerable
From d2 in dt2.AsEnumerable
Let ra = d1.ItemArray.Concat(d2.ItemArray).toArray
Select r = dtMerged.Rows.Add(ra)).CopyToDataTable
then write back dtMerged to an Excel / new Worksheet