Excel - Read Range activity error - object reference is not set to instance of an object

Hie,

i am a learner at Uipath. I have an issue with the Read Range activity of workbook activity in uipath. even though my workbook path is correct, my packages are up to date and my output is set to a global variable of type datatable - it shows me an error - " Object reference is not set to the instance of the object ".

I have a few workflows in the same project and Read Range in other workflows are very fine. I even tried to construct the specific workflow but in vain. I didnot have a clue of what happened all of a sudden.

please help out. Any ideas are appreciated .

1 Like

is it the Read Range activity that gives you that error? Are you using variables to fill any of its input properties? maybe you have any without values…

HI @Srikavya_n

In additiona to what @bcorrea mentioned, if all the input properties are properly provided and it is still not working, try using the read range with excel application scope as well and see whether it works…

If you have used variables for input properties, try printing the values or debugging it to see whether it gives the expected input through the variables

I used a dictionary <key,value> pair (argument) to fill the workbook path.

you mean like this: MyDictonary(“ExcelFilePath”).ToString?

yes. eaxctly. but i havent used excel application scope in any other part of other workflows. and they worked perfectly fine

so you need to check the dictionary, its keys and values…

i even printed the path of dictionary <key,value> and the resulting path is also printed without error

i gave the original path just as to check. even when i entered the path, the error still persist.

then you have some problem with your file… maybe dont have permission to read…

i Have checked them. I didnt know why it stopped working all of a sudden. I used the same activity wit same type of input for a few times before getting stuck

what do you mean getting stuck? Are you saying the error comes after started reading the data? It is not right at start of activity? If this is the case, maybe you have too much data for this activity or some special format that will need excel and excel scope to work…

my debug stops right at read range activity

.

did you try without PreserveFormat = True to test?

1 Like

Yeah. i did. im trying to delete the current excel and re create and try once more. will let you know. Thanks for the patience.

1 Like

Finally. It worked. Apparently it worked after i deleted the existing excel and recreated a new excel and gave its path as usual.

Thanks a lot for the advice. made my day. :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.