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 a last r...
Power Automate
Answered

How can I get a last row of Excel file on OneDrive ?

(0) ShareShare
ReportReport
Posted on by 1,724

I want to get a last row values of Excel servey file to Power BI Service streaming dataset by my flow.

My question is how can I get a last row of Excel file on OneDrive.

 

My scenario

 Trigger: OneDrive - When a file is modifed

 ** Get a last row of Excel Servey file.

 Action: Power BI - Add rows to a dataset.

 

and Power BI Service reports survey result to dashboard in real-time.

 

Regards,

Yoshihiro Kawabata

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,985 Most Valuable Professional on at

    rHi @yoshihirok,

     

    Try to use an excel formula or VBA to push the last row to a defined new worksheet. Flow need to read this worksheet which will contain only one row.

     

    Thanks

  • yoshihirok Profile Picture
    1,724 on at

    Hi @abm, thank you for your reply.

     

    Excel include Formula and VBA cannot use from Microsoft Flow's "Exce" service, I think.

    I will try some way.

     

    Regards,

    Yoshihiro Kawabata

     

  • Verified answer
    yoshihirok Profile Picture
    1,724 on at

    I can get last row of Excel file by "Compoase" and "@last(outputs('rows').body.value)"

     

    Regards,

    Yoshihiro Kawabata.

  • faustocapellanj Profile Picture
    1,662 on at

    Hi Yoshihiro,

     

    I know this post is from February, but I am trying your solution, but it's not working for me. When I try your solution, I get the following error message when I try to save the flow:

    The template validation failed: 'The action(s) 'rows' referenced by 'inputs' in action 'Compose' are not defined in the template.'.

     

    If you or anybody else have gotten this to work, is there any chance more details can be provided on how this worked?

     

    Thanks.

  • faustocapellanj Profile Picture
    1,662 on at

    Hello everyone,

     

    I posted a message last night about the solution provided by @yoshihirok and something was confusing, but I was able to figure it out. On his Compose formula to get the last Excel row, he has ('rows'), but I just figured out that's the name of the Flow steps that retrieves the Excel rows. This is the expression that worked for me: "@last(outputs('Get_rows').body.value)".

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @yoshihirok and @faustocapellanj,

    How did you use the last row in next step of this flow? Did you perform any action like sending email or approval for just the retrieved last row? Can you share the screenshot of your solution? 

     

    Thanks!

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 283

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard