# I want to get the last row from a table

**URL:** <https://forum.uipath.com/t/topic/5786853>\
**Category:** Studio\
**Tags:** question\
**Created:** [October 29, 2026, 5:59am UTC](https://forum.uipath.com/t/topic/5786853 "2026-10-29T05:59:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Teo](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Teo](https://forum.uipath.com/u/Teo)\
**Post date:** [October 29, 2026, 5:59am UTC](https://forum.uipath.com/t/topic/5786853/1 "2026-10-29T05:59:51Z")

</div>

Thank you for your continued support.  
Is there a way to get the number in the last row, “9,” from a table like the one in the screenshot, where the first row isn’t the starting point?

 ![IMG_20261029_144453](https://global.discourse-cdn.com/uipath/original/4X/9/d/0/9d02933115e588e067fb935e9b21fcbe9560b446.jpeg)

I couldn’t get the Find First/Last Data Row activity to work.

Also, due to various circumstances, we plan not to use a DataTable.

I would appreciate your advice.  
Thank you.

---

<div class="post-metadata">

**Author:** ![arjun.shiroya](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/arjun.shiroya/32/545217_2.png) [@arjun.shiroya](https://forum.uipath.com/u/arjun.shiroya)\
**Post date:** [October 29, 2026, 6:24am UTC](https://forum.uipath.com/t/topic/5786853/2 "2026-10-29T06:24:15Z")

</div>

hi @Teo,

you can do this without using a `DataTable`. Place **Find First/Last Data Row** inside **Use Excel File** , select the range containing your table, choose a column that is always populated, and set the option to **Last populated row**. Store the output in an `Int32` variable such as `lastRow`. The activity returns the actual Excel row number, so if the last entry is on row 9, `lastRow` will be `9`. If you need the next empty row, use `lastRow + 1`.

---

<div class="post-metadata">

**Author:** ![Yoichi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/yoichi/32/523754_2.png) [@Yoichi](https://forum.uipath.com/u/Yoichi)\
**Post date:** [October 29, 2026, 6:30am UTC](https://forum.uipath.com/t/topic/5786853/3 "2026-10-29T06:30:16Z")

</div>

Hello,

> [@Teo](#):
>
> The Find First/Last Data Row activity didn’t work for me.

It seems to work properly in my environment. How did you test it?

 ![image](https://global.discourse-cdn.com/uipath/original/4X/6/6/b/66bd334ee429ae439bcea0f194c47986753f61dc.png)

---

<div class="post-metadata">

**Author:** ![Teo](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Teo](https://forum.uipath.com/u/Teo)\
**Post date:** [October 29, 2026, 6:46am UTC](https://forum.uipath.com/t/topic/5786853/4 "2026-10-29T06:46:44Z")

</div>

Dear @Yoichi,

Thank you as always for your support.  
It seems I was using it incorrectly.  
I just needed to set B4 as the starting point and enter the column names.

Thank you for your guidance.  
I was able to retrieve the data successfully.

---

<div class="post-metadata">

**Author:** ![Teo](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Teo](https://forum.uipath.com/u/Teo)\
**Post date:** [October 29, 2026, 6:48am UTC](https://forum.uipath.com/t/topic/5786853/5 "2026-10-29T06:48:16Z")

</div>

@arjun.shiroya

Thank you for your response.  
Thanks to you, I was able to retrieve it successfully.

---

<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:** [November 1, 2026, 6:48am UTC](https://forum.uipath.com/t/topic/5786853/6 "2026-11-01T06:48:38Z")

</div>

Closed on November 1, 2026, 6:48am UTC

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