The object reference is not set to an instance of an object

Hi guys,

I am excel automation , the task is excel sheet contains values and when i read the values and copy the values from one sheet to another sheet i am getting error

hi @vasanthbalan can you please share us your code? What is the variable you save the read out data and how does your assign activity looks like?

@vasanthbalan

This is because of the null values are passing to Assign, Share your workflow, so that we can check

Thanks

copydata.xaml (8.5 KB) project.json (1007 Bytes)

@vasanthbalan

As i don’t have any excel file, i can’t able to check the error, but you can try the column1 place output datatable activity and pass column1, you can check whether the data is not null

Mark as solution if this helps

Thanks

Hi, Thank you for your response,

I stored read data variable type is data table and excel sheet contains values. attached excel sheet for your reference,list.xlsx (12.7 KB)

@vasanthbalan

You are passing wrong column Name, Actually Excel has the column of “Name”, but you are passing columnName as “data”

image

Change that to “Name”, It will work

Mark as solution if this helps

Thanks

Hi, By mistake i typed and changed column name and even though i am getting same error

@vasanthbalan

For me it worked, can you check it has data? Also share me screens if possible

Thanks

Hi, i got the out put in output data table but when i try to get that column

values in assign acctivity, i am geeting same error

@vasanthbalan

Share me the expression screenshot and workflow screenshot

Thanks