Skip to main content

Notifications

Community site session details

Community site session details

Session Id : sUAqs70P2qrk8xw7eTSzqX
Power Automate - Power Automate Desktop
Unanswered

Loop through each row in excel

Like (0) ShareShare
ReportReport
Posted on 15 Apr 2021 19:57:56 by 6

Hi -I have a data table loaded from excel storing info I use to input in SAP. 

I need a loop to go through each row to get each cell to populate a UI element created.

What is the best way to do this?

***I was creating a list for each column and was planning to loop through, but I don't think that will work. I need it to look through each row.  There is no "Get Rows" action available in Power Automate Desktop

Thanks in advance!

 @loop @excel @rows 

  • vaibhavtandon87 Profile Picture
    182 on 08 Jul 2021 at 07:20:51
    Re: Loop through each row in excel

    @trax , did this work? I am in a similar fix to loop through Excel data on a web form / SAP screen

  • Henrik_M Profile Picture
    2,006 Super User 2024 Season 1 on 18 Apr 2021 at 08:38:38
    Re: Loop through each row in excel

    If you run the same Read action on that sheet, the column headers should show Posting Date From, Posting Date To, etc... which you can then use in the loop: %CurrentItem['Posting Date To']%

  • tracyannkenney Profile Picture
    6 on 16 Apr 2021 at 16:33:17
    Re: Loop through each row in excel

    tracyannkenney_0-1618590789114.png

     

  • Henrik_M Profile Picture
    2,006 Super User 2024 Season 1 on 16 Apr 2021 at 15:51:52
    Re: Loop through each row in excel

    You have the right option selected.

     

    Headers usually default to Column1, Column2, etc. when your start row is blank.

     

    Start row should be the header row.

     

    What does your Excel file look like?

  • tracyannkenney Profile Picture
    6 on 16 Apr 2021 at 15:13:56
    Re: Loop through each row in excel

    I do not see that option. I do see "First line of range is column name".

    I still need help with the steps. I want each cell in the row input in SAP, run the transaction, then loop back and do the next row. Each row has 6 inputs. I only understand how to loop 1 input. 

    tracyannkenney_0-1618585911494.jpeg

     

     

  • Canjun Profile Picture
    12 on 16 Apr 2021 at 14:37:07
    Re: Loop through each row in excel

    Canjun_0-1618583620971.png

    Canjun_1-1618583782957.png

     

    Hi Henrik,

    I think I'm having a similar issue with the for each loop. Even The data table has 0 inside, the if condition wouldn't pop up any message

  • tracyannkenney Profile Picture
    6 on 15 Apr 2021 at 21:32:02
    Re: Loop through each row in excel

    I do not see that option

    tracyannkenney_0-1618522233214.jpeg

     

  • Henrik_M Profile Picture
    2,006 Super User 2024 Season 1 on 15 Apr 2021 at 20:09:25
    Re: Loop through each row in excel

    The For each loop creates a dynamic %CurrentItem% variable with named cells (if you turn on headers in the advanced option of your Read from Excel worksheet. This means that you can pull out the exact data that you need each round, by writing something like %CurrentItem['ID number']% in your Populate text field action.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Power Automate Desktop

#1
eetuRobo Profile Picture

eetuRobo 11 Super User 2025 Season 1

#2
KO-05050229-0 Profile Picture

KO-05050229-0 4

#2
Brad Darragh Profile Picture

Brad Darragh 4

Overall leaderboard
Loading started