Read Range: Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index

I am getting error “Read Range: Index was out of range. Must be non-negative and less than the size of the collection.Parameter name: index” while reading excel file using workbook read range. Tried without giving any range and also by “A1”. nothing worked

Hi @Sanchit7

Is the excel sheet able to view ?

Ashwin S

Hi @Sanchit7

Index was out of range usually it will give error when your sheet name or the range of the cells are given wrong, it is better to show what you are trying to automate, so that we can check


Yes, when I use Read Range withing excel application scope, the bot stays in running mode and never stops nor gives any error. When I use workbook read range, it says index was out of range. Please help me

Hi @Sanchit7 ,

I do facing the same issue. Have you found the solution?. If you have, please share here. It will be useful for us too.

The excel sheet name and range are correct. But i still get this error. When i go with excel application scope’s read range activity, it works fine. But i want to use workbook’s read range activity. any idea?

Thanks in advance!

Hi @Gopi_Arumugam

i also faced this issue in the past , can you check your excel whether you are having negative values (negative values in the sense excel specifically some values these values are little strange ,In normal excel file values will be like below

in these files values will be like these

if the above mentioned values are there you need to ignore that particular column range and read remaining range which you want

Hi @amalmarella ,

Thanks a lot for your response. I don’t have any values like these in excel sheet. I found another scenario, The excel contains four sheets. In that one is pivot table. When i remove that pivot table sheet and try to read other 3 sheets. then it works. What could be the issue? But the pivot is not in the sheet which i want to read. Its a separate sheet.

1 Like

The cells should have value. If excel does not have any detail so that it can give error. And please use just double quota -""- like this read full range.

Hi @Gopi_Arumugam

it was good you identified it was causing due to pivot table , for that check with the person who created the pivot table , for every pivot table there will be reference sheet like when ever data in that sheet refreshed then pivot table also refreshes by itself. you need to check those references and data connections are given correct, try with multiple sample Input files