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

Notifications

Announcements

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? 

Categories:
I have the same question (0)
  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard