cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

How to get last row values in an excel using flows

Hi I am trying to get the values in the last row of an excel using flow. I have the last row of an excel using

 

last(body('List_rows_present_in_a_table')?['value'])

 

 However it returns a JSON value and i am not sure how to extract the values from the JSOn so that i can use that in an email and below is the JSON

 

{
  "@odata.etag": "",
  "ItemInternalId": "b7ecb7a1-9f8f-409c-8d84-8f972afb94ba",
  "ID": "10",
  "Start time": "43773.7610069444",
  "Completion time": "43773.7612731481",
  "Email": "test.net",
  "Name": "test",

}

 

 imageimage

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @ranred ,

 

Which value are you want to get from the JSON?

For example, you could take a try with expression below to get the ID value:

last(body('List_rows_present_in_a_table')?['value'])?['ID']

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support
Community Support

Hi @ranred ,

 

Which value are you want to get from the JSON?

For example, you could take a try with expression below to get the ID value:

last(body('List_rows_present_in_a_table')?['value'])?['ID']

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

The 'last' no longer seems to work with the excel table. 

My flow structure is the same as suggested. If i don't use compose with 'last' the flow runs, picking up every row and sending the email for each of the excel table's rows.

With 'last' compose does not provide the JS0N, which could be used for the next step

 

MS.PNG

I want to second that something about the expression doesn't work anymore. I had an automation running, but once Power Automate updated, it stopped working at this step and uses the row that worked last. I don't know this language, so sadly I don't know how to fix it. Any fixes would be greatly appreciated! Otherwise, I'll keep doing my research

Helpful resources

Announcements
New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (83,810)