cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Community Support
Community Support

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
Community Support
Community Support

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

Community Support
Community Support

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
PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

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!

Top Solution Authors
Users online (6,813)