Write range activity - Error message "Range does not exist"




When trying to write data from a dataTable to a new excel file (want him to create the file), there is an error message “Range does not exist” while the dataTable has data inside. This was done with a ‘write range’ activity. Do you have any idea?


"Range does not exist

Hi @Estelle,

If you want that your whole datatable is written into the excel sheet, try to let the Starting Cell property empty. Also, check if the Add headers is checked.

1.1 VA05.xaml (7.4 KB)

There are basically two ways to do it:



Hi @acaciomelo ,

Thanks for your reply.

Just try what you said but have the same error message. Please see below.

Error message:

Please let me know wht you think.


Hi @Estelle,

In this case, I suggest you to reinstall the UIPath.Excel.Activities package and then restart UIPath.

Insert excel formulas from Datatable into Excel as formulas and not as strings
Fastest way to write an excel formula into an entire column

Ok will do.


Hi @Estelle,
I also got the same error. No idea what the issue is. But then I tried using “Write Range” under the “Workbook” tree and it worked without any error. I thought this may help someone if they face the same issue.



Check your target EXCEL file is writable for your current user, I have the same issue, and I finally found that the Excel file has been writing protected except special users.

And also if the Excel file has some head row fixed or hidden columns, it will affect the write range to it.



I had the same error, actually i had genericValue data in my dataTable. Use .ToString for each Data which is not a string value.


Hi Estelle,

Suggest the comments provided by @Shinyo_Katsu_JP_Cons , I use to experience this problem even its not write protected.

  • Use new excel file, if you are using template to write the content just recreate the template.
  • Close excel instance if any running in task manager and try again.



I have been having the same error, but it went away when i removed the sheet protection of the file (and unshared it).
I hope you can use my picture below despite Microsofts annoying translation:
The first (and the one looking most like at retangular square) is “Protect sheet” and the one that looks like its been drawn by a drunk elephant is the “Share project folder”.

Execute macro fails when another excel file is open

Thank you for your answer, that was my error.


It worked out for me as well.


If you still want to keep the Excel file protected you can write two macros in VBA to unprotect at the start of the automation and unprotect at the end. You can use the execute macro activity for this


I’m still getting this error, the file is not protected. Has anyone figured this out?


When you get this error Range does not exist, Try Write Range from Workbook, It will work.



Hi Guys, I got the same issue, but what I did was I used the Write Range from System -> File -> Workbook, not from App integration -> Excel. Which means UiPath Studio got the two Write Range Activities with duplicated name. IF you select the correct one, will fix your error message!!! Go luck all!


can you please attach the workflow?