cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RobinV86
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
v-bacao-msft
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
v-bacao-msft
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

v-bacao-msft
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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (42,049)