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 / How to access/referenc...
Power Automate
Answered

How to access/reference a Table cell or List element?

(0) ShareShare
ReportReport
Posted on by 338

Say I have an Excel file with a variable number of rows, but the same number of columns.

I need to extract the data from the specific columns in each row and set that cell value to a variable.

 

So far this is what I have to select the used range, but I'm stuck on the For Each loop.

Cayshin_0-1607609902529.png

 

I've used Message Boxes to confirm the For Each loop is iterating through each row, but how do I access a specific element of that row?

For instance, in my For Each loops, I want set 4 different variables, one to each value from each column of that row. I can't figure out how to access the specific column's value.
In the Flow variables, I see I can expand CurrentItem to select some elements, but not how to reference a column.

Cayshin_1-1607610409602.png

 

So another idea I had was to Split the row to generate a List, but then I ran into the same problem of how to access an element in that list. Like if I was using Python, the List's Index[0] would end up as the first column, Index[1] would be the second column...

 

Any suggestions on how to accomplish this?

 

I have the same question (0)
  • Cayshin Profile Picture
    338 on at

    So I just solved my own question, but I don't think it's very pretty or efficient. If anyone has a better idea, please post below.

     

    I used a Count variable and a Switch condition to set the correct variables.

    Cayshin_0-1607611245170.png

    Cayshin_1-1607611288560.png

     

     

  • Verified answer
    Dszum Profile Picture
    13 on at

    Hey Cayshin,

     

    CurrentItem variable from the "For each" action is of type Datarow, so you should be able to access a column's value by using the index position.

     

    For example %CurrentItem[0]%' will give you a value of the first column. 

     

    Dszum_0-1608137390143.png

     

  • Cayshin Profile Picture
    338 on at

    Thanks @Dszum, that's exactly what I was hoping for!

  • AdminSCMENAPP Profile Picture
    13 on at

    @Dszum Is there any possible way to increment index number based on loop count? 

  • bxmns Profile Picture
    2 on at

    @AdminSCMENAPP  Yes %ArrayName[LoopCounterVarName]%

    For example %CurrentItem[SomeCounter]% (you can declared %SomeCounter% and increase it in your For Each).

     

    Everything you write between percent symbol % % that matches a declared variable name on your flow, the compiler will refer to it.

     

    Have a nice day.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 376

#2
Valantis Profile Picture

Valantis 361

#3
David_MA Profile Picture

David_MA 294 Super User 2026 Season 1

Last 30 days Overall leaderboard