Copy a specific column and add that column in the another excel

i have 2 excel file,i need to copy one column to another excel file. please help on this

We won’t able to use add datacolumn activity with datacolumn value been passed as you say we need to copy the same column from one datatble to another one,
—and here if we do so this column already used by this datatable error will be coming
—so what we can do is extract the datatable from both excels dt1 and dt2
—in dt1 we can add a new datacolumn with add datacolumn activity where in the property instead of datacolumn mention the column name and the datatable name so that it will get added at last of the datatable
—now once after adding use a for each row loop and pass the variable dt2 as input
—inside the loop use a assign activity and mention like this
dt1.Rows(dt2.Rows.IndexOf(row))(“your new columnname”) = row(“yournewcolumnname”).ToString

That’s all this will add all the values of that column from one excel to another

Cheers @priyankavivek

1 Like

thank you i will try this

1 Like

Hi ,
I have two column values like Name and Date in one datatable i want add this two column data into another datatable the column name are different from one another there are many columns in that name will be the first column and date will be the last column i can we do this


Yah the same above steps can be done with two assign activity for assigning two values to the newly added two columns

But I couldn’t get this buddy

Cheers @Roopesh

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.