Write Range: Object reference not set to an instance of an object error

Hi All,
im getting below error on writing data to excel.
“Write Range: Object reference not set to an instance of an object.”


Probably DataTable which you want to use in this activity is null.
So there is something wrong before with this DataTable.
If you still have trouble with finding the cause, please send as code where you are generating this data table, or passing it as an argument.

1 Like


Check your argument direction from any sub-wotkflows. Likely not passing it back out.



1 Like

@Konrad_Mierzwa could you please check below image. im trying to merge two datatable information. but when im checked i got the blank details on message box.


Did you check content of ExtractDataTable3 in the above workflow? if you need to check merged datatable, perhaps it should be ExtractDataTable1.


@Yoichi Im not sure how to merge two unmached datatables details. maybe while merging im getting some error. any video reference or sample workflow to validate.

You are merging ExtractDataTable with ExtractDataTable1. So this activity adding rows from ExtractDataTable to ExtractDataTable. It’s do nothing with ExtractDataTable3, which is still empty, so after Output Data Table activity you have empty string and blank messagebox. Try to use ExtractDataTable1 in Output Data Table activity.

@Konrad_Mierzwa Hi,But the end im getting only ExtractDataTable1 data i have data in both variables ExtractDataTable and ExtractDataTable1. Please check below image and suggest

In merge data table activity we have MissingSchemaAction in propert panel:
Try to select ‘Add’ option