I have 3 Data tables DT1 with the “Item” column
DT2 with the “Property” column
DT3 with the “Info” column
I want to add/append all these columns into a single data table. Say FinalDT.
Need to use only 1 “Write Range” activity.Merge is not working.
Any suggestion is appreciated.
@lakshman Thanks for the suggestion. Now I’m following the same process where 3 “Write Range” activities write into same excel. This reducing the performance(Opening and closing excel so many times).
That’s why i want to add columns into single data table and write into excel.
@Kavya_Mamidishetti2
Create an empty datatble with the three cols with the help of Build datatable - dtMerged
then use an assign activity:
left: dtMerged
right
(From x in Enumerable.Range(0, dt1.Rows.Count)
Let ra = new Object(){dt1.Rows(x)(0),dt2.Rows(x)(0),dt3.Rows(x)(0)}
Select dtMerged.Rows.Add(ra)).CopyToDataTAble
Feel free to use ColName instead of ColIndex
in case ofg the datatables will have different row counts we can adopt also have a look here: