cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tracyannkenney
New Member

Loop through each row in excel

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 

7 REPLIES 7
Henrik_M
Responsive Resident
Responsive Resident

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.

tracyannkenney
New Member

I do not see that option

tracyannkenney_0-1618522233214.jpeg

 

Canjun
Frequent Visitor

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

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

 

 

Henrik_M
Responsive Resident
Responsive Resident

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_0-1618590789114.png

 

Henrik_M
Responsive Resident
Responsive Resident

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']%

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (957)