Error: Object reference not set to an instance of an object. This error usually occurs when using a variable with no set value (not initialized) in ADD DATA ROW


I am getting this error while adding data to dataTable using add data row.
I have initialized all variable with “” except array variables. Please suggest.


Hi @rk.sati,

Could you post the screenshot of error message in detail.

Hoang Anh.

This error always happens when you have an array or table variable with no data. In this case, it’s most likely the datatable variable has no initial data. I would suggest using Read Range and verifying that part works, or using Build Data Table activity; that way, your datatable has columns and data which you can then add to.

1 Like

Thanks, I have now initialize my variable and array with blank. Its working fine now