Support > Forums > OpenBots Studio > error while get range

error while get range

Nived N

  • Reporter
  • Calender Icon November 30,2020 at 5:34 PM

Hi i am new to openbots

I am using the get range commands to read the excel file of specified range . i can able to set range as A1:A10 like that . But i need to get the data from the overall sheet without specifying the range. How to do that ? please help

Regards Nived N

This forum has 172 topics, 459 replies, and was last updated 2 hours ago by Poornima Malv

Lakshmi Sukumar

  • Participant
  • Calender Icon December 04,2020 at 5:14 PM

Hi Nived, I get the same runtime binding error when there is an empty column name with some data for that column- just like below scenario, where I have the second column name empty. In this case I have 'Add headers' set to 'Yes' in the Get Range Command.

column name EmployeeName Data ABC 10401

It would help if you check if there is any null column name in the data. You can try with 'Add Headers' option in Get Range set to 'No' for now to deal with the empty column name. This would take care of retrieving all the data from the Excel from 'A1:' .

Hope this helps !

Cameron [OpenBots]

  • Participant
  • Calender Icon December 01,2020 at 3:04 PM

Hello Nived,

Given the name of your project I assume you are doing the RPA Challenge. The excel document downloaded for that challenge has ~990 blank rows under the main table allocated, which as described above does cause some issues with the current implementation. That is why you are seeing that error. The workaround in that particular case is to use the Get Last Row Index Command and provide the range as �A1:G{lastRow}�, where G is the known last used column in the document and lastRow is the output of the Get Last Row Index Command. This will allow you to retrieve all of the data for a known set of columns. We plan to have a fix in for this issue in the next update.

Nived N

  • Participant
  • Calender Icon December 01,2020 at 4:36 AM

while putting range A1: like this i am getting this error

Source: C:\Users\NIVED\Documents\OpenBotsStudio\My Scripts\rpachallenge1\Main.json, Line: 5 Get Range [Get Range 'A1:' - Store DataTable in '{dt1}' - Instance Name 'excel1'], Exception Type: RuntimeBinderException, Exception Message: Cannot perform runtime binding on a null reference

Why so ? but when i used a presribed range i got values correctly and was running fine Can u help me to solve it

Regards Nived N

Nived N

  • Participant
  • Calender Icon December 01,2020 at 4:07 AM

Hi Cameron, i used the range as A1: , but issue was that it showing some error .

Cameron [OpenBots]

  • Participant
  • Calender Icon December 01,2020 at 4:02 AM

Hello Nived,

We support the accessing of a range specified from an initial cell outward. To select the entire sheet starting with cell A1 you would put "A1:". The absence of a limiting cell after the colon will result in it grabbing everything. Currently our implementation has a bit of trouble with extra blank rows/columns after the used space in the sheet. You can find and delete the rows/columns from the provided input by going into Excel and following the below steps:

Click Find & Select -> Go To Special -> Blanks -> OK

Another workaround for this is to use the Get Last Row Index Command and provide the range as "A1:D{lastRow}", where D is the known last used column and lastRow is the output of the Get Last Row Index Commands. We plan to have a fix in for this issue in the next update!

Please let me know if you have any further questions or concerns. Cameron.

You are not authorized to reply, please click here to login and add your reply to this topic.