How to use add data row activity with For each row loop using C#-windows

i am using C# windows uipath for automation process
in this process how to use add data row Activity in for each loop

1 Like

Hi @Ram_Gurav1 ,

I am not sure , Why you are using Console.WriteLine in an Assign Activity .

Try Replacing it with the below Statement :


Let us know if it doesn’t work, and the Error Message Given.

Or Rather, You could directly use CurrentRow.ItemArray() in the ArrayRow Property of Add Data Row

i am just trying, need any solution

@Ram_Gurav1 , You could Try with the Above mentioned methods.

But it does Require, Both the Datatables to to be having the same number of Columns. Else it would provide us Error.


Can you try as the following? I don’t think we need to use NewRow method.



hello sir,

its work but i want only selected column add in new data table


How about the following?


new object[]{CurrentRow["ColumnName1"],CurrentRow["ColumnName2"]}


thank you sir

1 Like

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