Read Range Workbook: Index was outside the bounds of the array

hi, am getting this error while reading excel file…please any one can help me to solve this? and what does it means?

Hi @Hemant_Deshmukh

Verify the range: Double-check the range you are specifying in the Read Range activity. Ensure that the range includes all the data you want to read from the Excel file. If the range is too small or exceeds the actual data range, it can result in an index out of bounds error.

So, Try by using excel read range Activity.

Hope it helps!!

@Hemant_Deshmukh

Please take a screen shot of the activity where you encounter this error.

In range Property you mention any range please check that range.

Hi @Hemant_Deshmukh

May be you are mentioning the range index in the Read range workbook activity which there is no data in that range.

Check the data is present in the specified range or not manually.

Hope it helps!!

I Assume that this error could occur if you are trying to access an element in the array that doesn’t exist, possibly due to an issue with the range you specified.

The error message “Read Range: Workbook index was outside the bounds of the array” in UiPath typically occurs when you are trying to read a range from an Excel workbook, and the specified workbook index does not exist or is out of range.

Here are a few things you can check and troubleshoot:

  1. Workbook Index: Ensure that you are providing a valid index for the workbook you are trying to read. In UiPath, the workbook index is usually zero-based, meaning the first workbook has an index of 0, the second has an index of 1, and so on.
  2. Workbook Existence: Make sure that the workbook with the specified index exists. If you are trying to read from the first workbook, make sure there is at least one workbook open.
  3. Read Range Activity Properties: Check the properties of the “Read Range” activity in UiPath. Verify that you are specifying the correct workbook index and range.
  4. File Path: If you are using a file path to open the workbook, ensure that the file exists at the specified location and that you have the necessary permissions to access the file.
  5. Excel Application Scope: If you are using the “Excel Application Scope” activity, ensure that the correct workbook is opened within the scope, and the index you are using corresponds to the correct workbook.

(i was not getting this error earlier) I haven’t mention range because i want to read complete file…file had more than 30000 rows . I deleted many rows then i tried one’s again ,now I am NOT getting this error…is that means there is something wrong with excel file?

@Hemant_Deshmukh

While you have huge amount of data in excel better to use excel activities instead of workbook activities.

Use Excel Read Range activity In range " " add this which selects complete range

@Hemant_Deshmukh

Yes. When you use huge amount of the data in excel consider these points.

Excel 2003 and earlier .xls format can support only 65,536 rows.

Excel 2007 to Excel 2016 (32-bit).xlsx format can support 1,048,576**(you might experience Excel performing poorly when you fill all the rows with data.) **

Excel 2016 to Excel for Microsoft 365 (64-bit) .xlsx format 1,048,57 rows and 16,384 columns of data, it works seamlessly perform all the data analytics and visualization functions.

How Many Rows Can Excel Handle? | How To Excel

Check the range and use the format.

we can resolve these issues by using the Excel activities.

When using those annoying ‘modern’ excel activities:
Uncheck the ‘Visible rows only’ in your read range activity.
I had this similair issue. Even though there was no hidden data in my sheet that checkbox caused my error.

i tried this time with excel scope activity now i am getting this error-Read Range: Could not read range A:IV.

@Hemant_Deshmukh
Don’t give the range
Leave it as empty

problem is solved with workbook activity when i format all columns in excel to general.

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