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

Hello friends, new to Ui Path and am in need of some help please and thank you.

The issue i am having is: The workflow saves an excel file and then sends out an email. But for some reason, i am getting an error within the Write Range of this sequence and I am not sure why. Variable used: datatable


Hello @kwhites5229 ,

The Sheet, “Sheet1”, exist in your Excel file?
Is the datatable empty?

Maybe you can put some logging to get more details…

Vasile.

Hi,

Your datatable variable might be null (Nothing). How did you set value to it?

Regards,

1 Like

Sorry not sure if I am following – but in the beginning of the workflow – I have the datatable and I add a 3 columns to it. (datatable’s variable type is datatable – but the type argument here is object)

Hi,

To isolate cause, can you try to run Debug mode? We can see value of variable at Locals panel, when exception occurs and it stops.

Regards,

Hai @kwhites5229 Can you please share the xaml file, so that we can validate it. Thanks.

The file is very large – here is a screen shot of it.

I will go through debug mode. But I am not sure how to really work debug mode. As I am just learning. What should I be looking for? Thanks for your help and patience at this time J

This is working J all set here thanks