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

How can I delete "X" rows at top of Excel Table?

Hi Experts,

I have an Excel Online for Business Spreadsheet Table that is updated by Power Apps and I need a flow to remove rows from the top of the table.

I need to find total number of rows ("X"), then

("X" - 1500) = "Y", then

Delete "Y" number of rows at top of table.

 

Can this be done in Power Automate and have it run when table reaches < 1500 rows?

I'm new to Power Platform and just need a little guidance.

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @william_wallace :

Cause Power Automate can only delete one row at a time, you should create a loop to delete rows one by one.I suggest you use the Remove function of Power Apps to delete records in batches.

1\Set the 'Data row limit' to 2000

 

vbofengmsft_0-1629165025345.png

2\Add a button and set it's OnSelect property to:

 

Remove(TableName,FirstN(TableName,30)) /*Delete the top 30 records of the data source*/

 

Note:If there are many records to be deleted, this command will take a long time to execute

Best Regards,

Bof

View solution in original post

1 REPLY 1
v-bofeng-msft
Community Support
Community Support

Hi @william_wallace :

Cause Power Automate can only delete one row at a time, you should create a loop to delete rows one by one.I suggest you use the Remove function of Power Apps to delete records in batches.

1\Set the 'Data row limit' to 2000

 

vbofengmsft_0-1629165025345.png

2\Add a button and set it's OnSelect property to:

 

Remove(TableName,FirstN(TableName,30)) /*Delete the top 30 records of the data source*/

 

Note:If there are many records to be deleted, this command will take a long time to execute

Best Regards,

Bof

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

Users online (3,679)