cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Get last row in Excel table with data in it

I have an excel table with about 2000 rows. Only about 1530 are in use. Everytime we start a new project, we fill in a new line using a VBA script. This spreadsheet is uploaded to a sharepoint list automatically to further tie in with other workflow tools. 

 

Uploading the entire sheet through flow takes about 30 minutes. I want to build a script that only uploads the last line (so a new project) every time the excel file is changed. This will be a lot faster. 

 

How would I set up flow so it would only create a new item for the last row in the table that has data in it? 

 

Can I do this using one of the settings in the List rows present in a table  the Filter Query box? Or by putting an expression in the top count/skip count? 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Get last row in Excel table with data in it

Hi @RobinV86 ,

 

You could get the data of the last row by the following method.

  • Configure List rows present in a table to get all the records.
  • Use last() function to get the last row:

Expression:

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

32.PNG

In order to facilitate the reference data, we also could to configure the following steps.

Run the Flow in the above configuration, copy the contents contained in Compose's Outputs, and paste it in Parse JSON action.

30.PNG31.PNG

This makes it easy to use the last line of data.

34.PNG

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
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

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Get last row in Excel table with data in it

Hi @RobinV86 ,

 

You could get the data of the last row by the following method.

  • Configure List rows present in a table to get all the records.
  • Use last() function to get the last row:

Expression:

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

32.PNG

In order to facilitate the reference data, we also could to configure the following steps.

Run the Flow in the above configuration, copy the contents contained in Compose's Outputs, and paste it in Parse JSON action.

30.PNG31.PNG

This makes it easy to use the last line of data.

34.PNG

Hope it helps.

 

Best Regards,

Community Support Team _ Barry
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

Highlighted
Community Support
Community Support

Re: Get last row in Excel table with data in it

Hi @RobinV86 ,

 

Specific configuration process:

 

7890.gif

 

Best Regards,

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

Helpful resources

Announcements
firstImage

Super User Program Update

Three Super User rank tiers have been launched!

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Top Kudoed Authors
Users online (6,819)