I am trying to use the ‘Add Data Row’ activity within a ‘For Each Row’ in a DataTable activity, but I encountered an error: ‘Add Data Row: Object reference not set to an instance of an object.’ How can I resolve this issue
Did you initialize the data table. use Build DataTable activity to create one DataTable with all required columns and then use Add DataRow activity to add data row to excel file and pass Array row as like below.
{"Value 1","Value 2",......."Value N"}
Regards
I followed the same steps, but I’m still encountering the same error.
It seems some variable is empty, that’s why its throwing an error. Check whether every variable you have used in Add Data row has an value.
Regards
I tried using a new object, but it still isn’t working.
The screenshot clearly indicates that your datatble is null. Make sure you have passed the variable in Build DataTable activity.
Regards
Please place the Build datatable outside For Each row in Datatable activity.
Regards
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.