# Read Range Index Error

**URL:** <https://forum.uipath.com/t/read-range-index-error/400143>\
**Category:** Activities\
**Tags:** studio, robot, excel, activities\
**Created:** [February 17, 2022, 10:47am UTC](https://forum.uipath.com/t/read-range-index-error/400143 "2022-02-17T10:47:15Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShadowZ](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/shadowz/32/283109_2.png) [@ShadowZ](https://forum.uipath.com/u/ShadowZ)\
**Post date:** [February 17, 2022, 10:47am UTC](https://forum.uipath.com/t/read-range-index-error/400143/1 "2022-02-17T10:47:15Z")

</div>

I don’t understand why I’m getting this error:

- Read Range: the index was out of interval. Must be a non negative value and less than the size of the colection.
- Name of the parameter: index.

This have no sense, because I’m using the same header and in one Excel works, but in another with exactly the same header not.

 ![2022-02-17 11_41_27-490698062 - AnyDesk](https://global.discourse-cdn.com/uipath/original/4X/f/3/b/f3b669240c40c3e8400a699ffb8a3153fb89d754.png)

 ![2022-02-17 11_46_18-490698062 - AnyDesk](https://global.discourse-cdn.com/uipath/original/4X/e/d/1/ed17e765b961a1d419874b33347653a9e34cba4b.png)

---

<div class="post-metadata">

**Author:** ![PrankurJoshi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/prankurjoshi/32/37212_2.png) [@PrankurJoshi](https://forum.uipath.com/u/PrankurJoshi)\
**Post date:** [February 17, 2022, 10:50am UTC](https://forum.uipath.com/t/read-range-index-error/400143/2 "2022-02-17T10:50:28Z")

</div>

Hi @ShadowZ

Can you show what have you passed in Read Range?

Thanks,  
Prankur

---

<div class="post-metadata">

**Author:** ![ShadowZ](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/shadowz/32/283109_2.png) [@ShadowZ](https://forum.uipath.com/u/ShadowZ)\
**Post date:** [February 17, 2022, 10:56am UTC](https://forum.uipath.com/t/read-range-index-error/400143/3 "2022-02-17T10:56:19Z")

</div>

Hi,  
Yes.

 ![2022-02-17 11_54_42-490698062 - AnyDesk](https://global.discourse-cdn.com/uipath/original/4X/8/8/d/88da5f201ba7745e764da415e93e316e63b77baa.png)

---

<div class="post-metadata">

**Author:** ![PrankurJoshi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/prankurjoshi/32/37212_2.png) [@PrankurJoshi](https://forum.uipath.com/u/PrankurJoshi)\
**Post date:** [February 17, 2022, 11:08am UTC](https://forum.uipath.com/t/read-range-index-error/400143/4 "2022-02-17T11:08:36Z")

</div>

> [@ShadowZ](#):
>
> Read Range: the index was out of interval.

Can you please try to run it with excel application scope?

Thanks,  
Prankur

---

<div class="post-metadata">

**Author:** ![ShadowZ](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/shadowz/32/283109_2.png) [@ShadowZ](https://forum.uipath.com/u/ShadowZ)\
**Post date:** [February 17, 2022, 11:16am UTC](https://forum.uipath.com/t/read-range-index-error/400143/5 "2022-02-17T11:16:52Z")

</div>

Sorry but throws an error saying that the procees is being used. Because first I add the data and then I read again to see the blank values and when I try to read again, this error appears. I don’t understand, becuase then I used another Excel with the same header and works.

---

<div class="post-metadata">

**Author:** ![PrankurJoshi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/prankurjoshi/32/37212_2.png) [@PrankurJoshi](https://forum.uipath.com/u/PrankurJoshi)\
**Post date:** [February 17, 2022, 11:19am UTC](https://forum.uipath.com/t/read-range-index-error/400143/6 "2022-02-17T11:19:44Z")

</div>

Okay you can either close the workbook and read it or you can use excel application scope with property visible as checked and try it.

Also make sure there are no formulas in the excel with broken value, they usually creates problem.

Thanks,  
Prankur

---

<div class="post-metadata">

**Author:** ![ShadowZ](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/shadowz/32/283109_2.png) [@ShadowZ](https://forum.uipath.com/u/ShadowZ)\
**Post date:** [February 17, 2022, 11:42am UTC](https://forum.uipath.com/t/read-range-index-error/400143/7 "2022-02-17T11:42:29Z")

</div>

I tried with an Excel with more than 80 sheets, but with the same structure on the MB52 and fails. But then when I try with a single excel with only the MB52 sheets works, why?

---

<div class="post-metadata">

**Author:** ![PrankurJoshi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/prankurjoshi/32/37212_2.png) [@PrankurJoshi](https://forum.uipath.com/u/PrankurJoshi)\
**Post date:** [February 17, 2022, 11:44am UTC](https://forum.uipath.com/t/read-range-index-error/400143/8 "2022-02-17T11:44:52Z")

</div>

Can you share that excel if it does not have any confidential data?

Have you tried with removing the data and only with header?

Thanks,  
Prankur

---

<div class="post-metadata">

**Author:** ![ShadowZ](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/shadowz/32/283109_2.png) [@ShadowZ](https://forum.uipath.com/u/ShadowZ)\
**Post date:** [February 17, 2022, 12:40pm UTC](https://forum.uipath.com/t/read-range-index-error/400143/10 "2022-02-17T12:40:50Z")

</div>

Okey, I have good news. I tried as you sayed with excel aplication scope and with read range and don’t say the same error, now says:

- The column 0 already belongs to DataTable.

It’s a progess.

---

<div class="post-metadata">

**Author:** ![ShadowZ](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/shadowz/32/283109_2.png) [@ShadowZ](https://forum.uipath.com/u/ShadowZ)\
**Post date:** [February 18, 2022, 10:19am UTC](https://forum.uipath.com/t/read-range-index-error/400143/11 "2022-02-18T10:19:27Z")

</div>

Okey, Finally I get the result with excel scope and read range. Thnks for the help.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [February 21, 2022, 10:19am UTC](https://forum.uipath.com/t/read-range-index-error/400143/12 "2022-02-21T10:19:38Z")

</div>

Closed on February 21, 2022, 10:19am UTC

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