# ExcelReadRange Activity, custom range

**URL:** <https://forum.uipath.com/t/excelreadrange-activity-custom-range/553541>\
**Category:** Activities\
**Tags:** read-range, excel, activities\
**Created:** [June 13, 2023, 6:59am UTC](https://forum.uipath.com/t/excelreadrange-activity-custom-range/553541 "2023-06-13T06:59:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dbukk](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/dbukk/32/398782_2.png) [@dbukk](https://forum.uipath.com/u/dbukk)\
**Post date:** [June 13, 2023, 6:59am UTC](https://forum.uipath.com/t/excelreadrange-activity-custom-range/553541/1 "2023-06-13T06:59:33Z")

</div>

Hello folks,

My aim is to read the cells from the Excel spreadsheet, range A3:G and all way down. When entering this range into the activity, I get an error **Could not read range A3:G**

How can I go over it?

---

<div class="post-metadata">

**Author:** ![karthickrkumaran](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/karthickrkumaran/32/365826_2.png) [@karthickrkumaran](https://forum.uipath.com/u/karthickrkumaran)\
**Post date:** [June 13, 2023, 7:02am UTC](https://forum.uipath.com/t/excelreadrange-activity-custom-range/553541/2 "2023-06-13T07:02:11Z")

</div>

Hi @dbukk,  
Please specify the cell number in the read range like A3:G3

---

<div class="post-metadata">

**Author:** ![dbukk](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/dbukk/32/398782_2.png) [@dbukk](https://forum.uipath.com/u/dbukk)\
**Post date:** [June 13, 2023, 7:06am UTC](https://forum.uipath.com/t/excelreadrange-activity-custom-range/553541/3 "2023-06-13T07:06:11Z")

</div>

Thanks, but selecting A3:G3 returns only the third row. I need all rows beginning from the third and down.

---

<div class="post-metadata">

**Author:** ![Tushar1](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/tushar1/32/324193_2.png) [@Tushar1](https://forum.uipath.com/u/Tushar1)\
**Post date:** [June 13, 2023, 7:10am UTC](https://forum.uipath.com/t/excelreadrange-activity-custom-range/553541/4 "2023-06-13T07:10:43Z")

</div>

Hi @dbukk

First read whole sheet, store it into datatable var and gert row count, then  
To select all rows use “A3:G”+YourDataTable.RowCount.ToString

---

<div class="post-metadata">

**Author:** ![adiijaiin](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/adiijaiin/32/523523_2.png) [@adiijaiin](https://forum.uipath.com/u/adiijaiin)\
**Post date:** [June 13, 2023, 8:04am UTC](https://forum.uipath.com/t/excelreadrange-activity-custom-range/553541/5 "2023-06-13T08:04:50Z")

</div>

Hi @dbukk

Are there some more columns after G, which you don’t wanna read?

If that is the case,  
please do the following,  
read the whole range starting from A3. Store it in a DataTable variable,  
retrieve the count of rows from here using **ReadRowCount = datatablename.rowCount**

Then again use a read range activity: pass “A3:G”+ReadRowCount.toString.

Thanks  
Happy Automation!

---

<div class="post-metadata">

**Author:** ![dbukk](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/dbukk/32/398782_2.png) [@dbukk](https://forum.uipath.com/u/dbukk)\
**Post date:** [June 13, 2023, 12:41pm UTC](https://forum.uipath.com/t/excelreadrange-activity-custom-range/553541/6 "2023-06-13T12:41:01Z")

</div>

Thanks @Tushar1 & @adiijaiin

That’s what I’ve impelemented. It works now.

---

<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:** [June 16, 2023, 12:41pm UTC](https://forum.uipath.com/t/excelreadrange-activity-custom-range/553541/7 "2023-06-16T12:41:17Z")

</div>

Closed on June 16, 2023, 12:41pm UTC

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