Problem adding data row in a for each loop

Hi.
I’m currently intersecting two data tables. One of them has one column fulfilled with emails. The other one has some Invoice information related. One of the said information is the email, which I’m using to intersect the two data tables.

Well, when i got a match i add the said row to an auxiliar data table with the add data row activity and then write this invoice information with the write range.

Thing is, I’m getting “Object reference not set to an instance of an object” error on the Add Data Row activity.

When printing the data row, what i get is “System.Data.DataRow” showed, which indeed is a null reference.

The DT I’m extracting the information tho, is not empty, I’m sure about that because it is writed before the loop starts.

Any suggestion?
Thank you

@rscabral

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"}

I was able to solve my problem using the Add Data Row activity with Array Row input instead the Data Row input, as suggested.
Thank you

1 Like

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