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 LAST ROW...
Power Automate
Unanswered

How can I get LAST ROW of Excel file in PowerAutomate?

(0) ShareShare
ReportReport
Posted on by 4

I am importing data from Power Vİrtual Agents to Excel via Power Automate. I need to keep the data last row in Excel the varriable. Excel is dynamically updated. I want to get last row in Excel. I have an Excel file. It has 3 column in a table. I want to get the last row of which is the column I want. But unfortunately I couldnt it. I need help about that.  I want to take columns in the last row and compare them.  These data are date and time. 

 

My second question is that there is date and time data in the cell i will import from excel. Can I compare  the sizes of this data? 

Screenshot from 2023-09-13 21-39-58.png
Categories:
I have the same question (0)
  • Manish Solanki Profile Picture
    15,167 Moderator on at

    Hi @mertyuksel 

     

    To fetch the last row in excel sheet, pls check out the below sample.

     

    Input excel sheet used for the below example:

    ManishSolanki_3-1694674750374.png

     

    Use "List rows present in a table" action to get the rows from the excel sheet:

    ManishSolanki_0-1694674401497.png

     

    Next, add "Compose" action and using expression we will fetch the last row in the table. Expression needs to be written in the expression box as highlighted below:

    ManishSolanki_1-1694674548020.png

    Expression used for getting the last record:

    if(greater(length(outputs('List_rows_present_in_a_table')?['body/value']),0),last(outputs('List_rows_present_in_a_table')?['body/value']),null)

    If there are no record, then the expression will return null value.

     

    Output:

     

    ManishSolanki_2-1694674708231.png

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • mertyuksel Profile Picture
    4 on at

    Thanks. but its not enough for me. Because I want to take a row in the which column i want. And i take an error (invalid expression) about this expression last(outputs('List_rows_present_in_a_table')?['body/value']). I dont understand that if I choose "List rows present in a table", how i take last row the column I want.  My table has 3 column.  Last row  is dynamically updated. I will use this value for next step. 

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 608

#2
Valantis Profile Picture

Valantis 416

#3
11manish Profile Picture

11manish 348

Last 30 days Overall leaderboard