web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Looping through excel ...
Power Automate
Answered

Looping through excel data

(0) ShareShare
ReportReport
Posted on by 182

Hi community,

 

I

Read excel.jpg

Read excel data in loop.jpg

Submit button.jpg

am using for each loop to get data from excel sheet which has 2 columns and 5 rows but getting error 

 

"Variable 'ExcelData' doesn't have a property 'Name'."

 

The column names in excel are - Name, Class

 

Below are the screenshots of workflow:

 

 

I have the same question (0)
  • TJP-RPA Profile Picture
    8 on at

    Hi @vaibhavtandon87,

     

    I suggest, that you expand the "Advanced" tab in your "Read data from Excel worksheet" and select the "My data has headers" option.

  • tkuehara Profile Picture
    667 on at

    Hi @vaibhavtandon87 

     

    You'll need to make a few changes:

    Change your "Read from Excel worksheet" action to include the first row and set it as a header row:

    tkuehara_0-1625748397969.png

    Also, I see you are using the value from the "Name" column to populate a web page field. You'll need to change it in order to read each row. Example:

    tkuehara_1-1625748694673.png

    I'm reading each row from the Excel and storing it in the %CurrentItem3% variable, thus the reference to %CurrentItem3['Column1']% and %CurrentItem3['Column2']% (those are the column names in my sample Excel file):

    tkuehara_2-1625748883146.png

     

  • vaibhavtandon87 Profile Picture
    182 on at

    Thanks @TJP-RPA for your prompt response. Its already activated.

  • vaibhavtandon87 Profile Picture
    182 on at

    Thanks @tkuehara  for your prompt response. 

     

    When you say 'I'm reading each row from the Excel and storing it in the %CurrentItem3% variable' what do you mean by that? In the read to excel step is the Currentitem3 3 variable created or you separately created that variable? If custom variable could you please explain how?

    More screenshots of complete workflow and properties would be helpful.

     

    Thanks for the help!

  • Verified answer
    tkuehara Profile Picture
    667 on at

    No problem @vaibhavtandon87 

     

    It means I'm reading the data table content one row at a time. This is achieved by the "For each" action. You could read as "For each row in excel data".

    tkuehara_0-1625757819979.png

    I left the default name created by PAD when I added the "For each" action (in this case, %CurrentItem3%), but you could use a more meaningful name (%ExcelRow%, for example). To change its name, click on the name and then edit it:

    tkuehara_1-1625758058616.png

    When you run, it will create a variable with two columns:

    tkuehara_2-1625761501633.png

     

    The flow would look something like this:

    macro_flow.png

  • vaibhavtandon87 Profile Picture
    182 on at

    Thanks @tkuehara  that worked!

     

    One quick check - if we are using current item to iterate through in for loop then what is the co relation of read excel data parameters like start column, end row? What I mean is if iterate step is automatically parsing through all the items until last row/column having data then why to explicitly mention column numbers/ row number etc in read from excel step?  Thanks!

  • tkuehara Profile Picture
    667 on at

    Glad to help @vaibhavtandon87 !

     

    I'll try my best to explain it.

    The read from Excel is the "bridge" to retrieve the data stored in your "physically stored data". You need to explicitly mention column/row numbers because PAD needs those parameters to "read" from the Excel file. Here you can also "filter" columns/rows, for example: if your worksheet has 5 columns but you only need data from the first 3 columns. Ater grabbing that data, PAD creates an in-memory data table structure which is  basically a virtual copy from the Excel file data.

    tkuehara_0-1625843711497.png

    The correlation among those items could be illustrated as follow (forgive the poor drawing skills lol):

    excel_file_PAD.png

  • vaibhavtandon87 Profile Picture
    182 on at

    Thanks for the explanation, it really helps!

  • avm Profile Picture
    2 on at

    I don't see "read from excel worksheet" as an option in Power Automate web - is it only available on desktop?  Thanks

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    It is definitely available on desktop, but this is a desktop forum.  You might have more luck in the Power Automate (Web) forum.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 1,027

#2
Valantis Profile Picture

Valantis 809

#3
Haque Profile Picture

Haque 645

Last 30 days Overall leaderboard