Range does not exist error

Hi,

I am trying to write message in excel by creating new sheet in excel but, it is giving error like range not exist.According to me range is correct and it is creating new sheet also but while writing message it is giving eror.
Please help me to solve this.
here are the screenshots.
screenshot of script.
error1
screenshot of error.
error2

Thanks

@Mathkar_kunal

Check whether the sheet name is correct, any spaces means you have to mention the same

also check is this file is completely open to write?

You can check by giving a delay before write cell if it is a heavy file

Hope this helps you

Follow Link

Thanks

i am creating new sheet as sheet 2 so sheet name is correct and file is completely empty at first to write message, so not heavy and opening too

@Mathkar_kunal

Can you share a sample file which you are getting this error, so it would be great to debug your issue

Thanks

here is the file
Reporting.7z (5.8 KB)

before this i am opening this file to write in first sheet .

@Mathkar_kunal

Can you share the properties of excel application scope?

As per the available resource i believe it is not finding the sheet thats why you are getting the error

Thanks

By writing sheet 2 in write cell , i am creating new sheet in same excel.
here are the properties.
error3

@Mathkar_kunal

I tried to replicate the same, and it was successful without any issue

pass a sample string value as above and can check

Hope this helps you

Thanks

Yes, passed sample string but same error is showing

@Mathkar_kunal

Then check the type of the variable you are passing into

also try to give CProjectName.ToString + “is already exist”

Hope this helps you

Thanks

yes tried with tostring also as u shown but same error is showing.

@Mathkar_kunal

Can you check what is the type of the CProjectName Variable?

Is that string only? also you can debug by placing a message box before the write cell and give the CProjectName

check any duplicates also

Thanks

Yes, i changed datatype to sting and even in write line it showing project name.
check this
error5

error6

@Mathkar_kunal

I see the scope of the variable is restricted to Body, can you make the scope to entire sequence also check for the duplicates with same name

If possible can you share the workflow or you can place a breakpoint and debug

Hope this helps you

Thanks

Scope is correct.i am attaching the workflow please go through and let me know if u find something.
May be it will not run at ur end but still just go through the process
Process.xaml (111.9 KB)

@Mathkar_kunal

I am unable to open your flow in my system

anyway you can always test with a test sequence and let us know

Thanks

I tried same logic which i have written with new excel sheet.now working.
but dont know why it not worked when i am creating sheet 2
Thanks for ur suggetions