Read Range : Object reference not set to an instance of an object

Scenario: Read range from excel returns object reference not set error

Steps to reproduce: read range with sepecified cell

Current Behavior: Not reading after upgrading excel activites

Expected Behavior: Need to read whole excel from specified cell

Studio/Robot/Orchestrator Version: latest version

Last stable behavior:
Last stable version:
OS Version:Windows server 2012
Others if Relevant: (workflow, logs, .net version, service pack, etc):

1 Like
1 Like

Hey, did you find any solution to this problem cuz i just bumped into it :-?

Could you please check if the excel package in updated in Manage Package window. It should be 2.0.6382.14545

1 Like

Hey, yes the package is up to date but it’s not only in excel but workbook too… i have the same robot on 5 machines and only one get’s this error, another get something else and on the rest of 3 machines it works flawlessly

Any update on this?

I have solved this issue just initializing the object that the activity ExcelReadRange is pointing to. That is, I set the output variable (array of strings, defined in my activity) to a default value {“”,“”,“”}. It works now.


I have resolved this issue by entering the VB expression in the variable. I never faced any problem after that. Try and let me know.

1 Like

Same problem here when using Read Range from Workbook. Initilizing the variable with “New System.Data.DataTable” did not work for me.


figured out it doesn’t take tablename as input, needs to write the exact range.
So UiPath.Excel.Activities.ReadRange can’t be used with tablename as input.
UiPath.Excel.Activities.ExcelReadRange accept tablename, but headers are not included in the tablename range!

Solution: “Get Table Range” actually stores the tablename as a range in a string, including headers.
Then use either of the ReadRange activities and use the range-string as input.
Remember to check AddHeaders (first row will be headers).


Is there any resolution for this? I’ve encountered that the activity crashes when I’m only inputting the initial cell instead of the range. (“A9” crashes but “A9:A10” works). This happened after Office got an Azure update where all files need to be tagged with a Sensitivity level.
I believe it’s a bug from UiPath. If I use Excel Application, it works.

This error occurs when you’re using a variable/object that has not been set yet. In my case, the variable that I was using to contain the data from Excel did not have the right scope. By default, Scope of the variable is the direct parent Sequence. Make sure to change the Scope before using the variable again. Set the scope of the variable to the main sequence and that fixed it.

I am curious though if this error prompts if the cell where youre reading from is empty.

1 Like

Try Inputting the Initial cell it works. Else leave the Range blank to read the entire sheet. Make sure there is no space between the quotes. Eg: “” and not " "
worked for me.

1 Like

I had the same kind of issue, that was solved when I filled in a cell in the excel file…

I am facing the same problem with “workbook read range” activity
I noticed that when I set a range Like “A1:C5” it worked but when I set the start cell only or keep it empty it didn’t work
also, I noticed that this error happed when only opening the file for the first time and it needs to click enable editing like in this image

so when I clicked enable editing and rerun the code it worked
How can I solve that??

Hello, I encountered the same error while reading an empty excel sheet.

The solution is to make sure the sheet you are reading has data and the error will dissappear

you can try to disable enable editing follows this steps: