# Loop in Excel

**URL:** <https://forum.uipath.com/t/loop-in-excel/3782>\
**Category:** Help\
**Tags:** excel, uiautomation, activities\
**Created:** [April 24, 2017, 8:57am UTC](https://forum.uipath.com/t/loop-in-excel/3782 "2017-04-24T08:57:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ste](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@Ste](https://forum.uipath.com/u/Ste)\
**Post date:** [April 24, 2017, 8:57am UTC](https://forum.uipath.com/t/loop-in-excel/3782/1 "2017-04-24T08:57:06Z")

</div>

Hi,

I did a flowchart where I go to different website and I collect price on different movies. It’s done and it seems to work.

But now, I want the software to go automaticaly to the second line in the excel form and make the same process again and again.

[Testing.zip](https://global.discourse-cdn.com/uipath/original/2X/a/a4a74a3b9bd0df1daa16778ae833cb8f9a887386.zip) (15.4 KB)

Edit: I got this message when I launch the process.

 ![](https://global.discourse-cdn.com/uipath/original/2X/c/c84bd9d42c97a44aaa808283d0911c6356f4c1e7.PNG)

---

<div class="post-metadata">

**Author:** ![Topi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/topi/32/263305_2.png) [@Topi](https://forum.uipath.com/u/Topi)\
**Post date:** [April 24, 2017, 9:39am UTC](https://forum.uipath.com/t/loop-in-excel/3782/2 "2017-04-24T09:39:58Z")

</div>

Hi,

in your example you are reading an empty datatable(My\_Datatable). Use a Read Range-activity where you read the excel-sheet and save it to My\_Datatable. Then you have data in there which you can access.

Br,  
Topi

---

<div class="post-metadata">

**Author:** ![Rahul](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rahul/32/2028_2.png) [@Rahul](https://forum.uipath.com/u/Rahul)\
**Post date:** [April 24, 2017, 9:40am UTC](https://forum.uipath.com/t/loop-in-excel/3782/3 "2017-04-24T09:40:39Z")

</div>

Hi @Ste,

Please see the attached updated the xaml. I have use the “ **data row** ” activity to get the values then used the Assign activity and incremented the value to write into cells. I am not sure of xaml perfection since I did not check the xaml. Because my Uipath has some issue to connect to IE. But this would work. Please let me know if it works.

[Main.xaml](https://global.discourse-cdn.com/uipath/original/2X/d/dcc20e2c946f524a60859634e358fb2ac0d0321f.xaml) (64.7 KB)

Regards,  
Rahul

---

<div class="post-metadata">

**Author:** ![Ste](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@Ste](https://forum.uipath.com/u/Ste)\
**Post date:** [April 24, 2017, 9:53am UTC](https://forum.uipath.com/t/loop-in-excel/3782/4 "2017-04-24T09:53:04Z")

</div>

@Topi : Oh maybe that’s the problem, I will check it thank you

@Rahul: It seems to have a problem I did a Screenshot.

 ![](https://global.discourse-cdn.com/uipath/original/2X/b/beba702da16f1aa4bc1530b48b70e81ce8611430.PNG)

---

<div class="post-metadata">

**Author:** ![Madhuraj](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/madhuraj/32/28519_2.png) [@Madhuraj](https://forum.uipath.com/u/Madhuraj)\
**Post date:** [April 24, 2017, 10:44am UTC](https://forum.uipath.com/t/loop-in-excel/3782/5 "2017-04-24T10:44:37Z")

</div>

Hello @Ste,

I checked your workflow, please see the attached xaml for your reference.

[Main.xaml](https://global.discourse-cdn.com/uipath/original/2X/2/286dce6297210f6069e9a156d6965983829e9e3c.xaml) (21.7 KB)

Regards  
Madhura

---

<div class="post-metadata">

**Author:** ![Rahul](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rahul/32/2028_2.png) [@Rahul](https://forum.uipath.com/u/Rahul)\
**Post date:** [April 24, 2017, 2:02pm UTC](https://forum.uipath.com/t/loop-in-excel/3782/6 "2017-04-24T14:02:42Z")

</div>

Hi @Ste,

Please find the attachment .[Sample - Superstore Sales (Excel).xls](https://global.discourse-cdn.com/uipath/original/2X/9/9eaca594b288e2ea356bddf48c4b830e3f9c7da3.xls) (2.9 MB)  
[Excel testing.xaml](https://global.discourse-cdn.com/uipath/original/2X/0/0c4d512a8a2b38b29121b4e0ea61b7f654f73276.xaml) (10.8 KB)

Regards,  
Rahul
