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 can I get Current ...
Power Automate
Unanswered

How can I get Current Item row in my excel data so I can write to excel?

(0) ShareShare
ReportReport
Posted on by 2

I have a desktop flow that needs to read from an excel worksheet, goes through each row of data (using For each), then have to write to excel worksheet on a specific column but on the current row where the For each is currently at. What can I put into the Row area of the Write to Excel worksheet action so I can refer to the %CurrentItem% row?

ms123_0-1681478531260.png


So far the only suggestions I can see online instruct me to use the Get first free row on column from Excel worksheet but this isn't going to work in my case.

 

Any ideas?

 

Thank you!

I have the same question (0)
  • momlo Profile Picture
    1,527 Super User 2024 Season 1 on at

    Since you are already doing it in a loop, adding a simple counter might work for you. For example

     

    You get your list of items.

    Before the loop, you set the "RowNumber" variable to 1 or whatever row you intend to start from

    You execute For Each loop

    in the loop you do whatever you need to do and use the "RowNumber" variable in the "row" field.

    At the end of the loop, you increment "RowNumber" by 1

     

    So this is just an example, there might be other, better ways, but this seems to be easy to start with based on what you gave 

  • mustang Profile Picture
    2 on at

    Hey @ms123 , did you get this? 

    Please share solution

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    You can use a counter like mondo suggested, or if the loop is the index, then you can use the LoopIndex such as:

     

    Loop 2 to %FirstFreeRow% increment of 1.  Then %LoopIndex% is always the current row in the loop.  

  • chucknb28409 Profile Picture
    34 on at

    The %LoopIndex% is only available in a loop not in a for each statement. It's crazy that you have to create a row counter variable when the system knows what row it is on.

  • beebul Profile Picture
    259 on at

    Did you ever find a solution @chucknb28409 as it's annoying having to have a variable running just to calculate the row number...

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

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 470

#2
Haque Profile Picture

Haque 411

#3
David_MA Profile Picture

David_MA 337 Super User 2026 Season 1

Last 30 days Overall leaderboard