Write Cell Failure - Object Reference Not Set

Hi I`m trying to write into excel cell.
but fail

1 Like

Hi @98d5b817dcd19244c50b

Can you check the variable name “CompanyName” If it has a value ?

cheers :smiley:

Happy learning :smiley:

1 Like


1 Like

@Palaniyappan any idea?


The excel to be read has the data present in the specified cell.

1 Like

Hey @98d5b817dcd19244c50b,
Please try this “CompanyName.ToString” & let me know …


Hi @98d5b817dcd19244c50b - Try to concatenate all those values whatever has been given in the Write Cell to a variable. And then use Write Cell with the Variable name.


Hi @AnandKumar26

Can you print the text through log message

Ashwin S

@98d5b817dcd19244c50b, First check the Range address , if it’s correct then write only CompanyName into that Cell address

or try to hardcode the CompanyName into that Cell address & then change to CompanyName variable.

there can be two reasons
either the variable passed as input to write cell activity that is CompanyName
the range we have mentioned has a variable in it
“B”+(some variablename) ///i m not able to see it

we need to validate both of them
–for first one use a write line activity and mention the variable as CompanyName.ToString as input so that it will show the value in the output panel
–then for the second one kindy share the expression used in that range

Cheers @98d5b817dcd19244c50b


1 Like

@98d5b817dcd19244c50b, Use Write line Activity -->See the Output for the Cell Address.

Check company name have value, that you to want to write first using log message and let me know …

Is DtExcel is the datatable we are currently iterating with the FOR EACH ROW loop or is it from outside this for each row loop
if so kindly check once whether the scope of that variable is set to whole sequence
did we check with the writeline activity for CompanyName.ToString

scope is do

but here the datatable mentioned is different

kindly change that datatable variable to whole sequence name as a scope, we can change that on clicking it
cheers @98d5b817dcd19244c50b