Add Data Row: Object reference not set to an instance of an object. In C#

Hi, I´m having problems trying to translate a filter from Visual Basic to C# in UiPath
when I create my for each and try to pass the paremeters of my file I got this problem of object reference not set to an instance o an objetct.



image

Hi @Raul_Alonso
Try like this {row(“NO.CUENTA”).ToString,row(“column name”).ToString}

Thanks
Robin

if you want to pass the whole row, just pass in row.ItemArray

Hi,

Can you check if your datatable variable at DataTable property of AddDataRow?
If it’s null, please initialize it such as

targetDT = OldDt.Clone()

OR

using BuildDataTable activity etc

Regards,

1 Like