web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / delete all but 1st row...
Power Automate
Unanswered

delete all but 1st row in table

(0) ShareShare
ReportReport
Posted on by 12
I've seen posts from @AJA21 & @Sunshine Gu with no resolution?  So asking for my situation:
 
I have a flow that adds rows to an excel file - a template that will be reused and therefore needs to have rows deleted in the flow before adding.  
Is there an action to perform that will delete rows from a table?
 
Caveat - my table starts @ row 6 (headers) and I want to delete any rows after row 7.  Row 7 contains a data validation list that I don't want to lose.
 
Thank you in advance!
Categories:
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    12,908 Super User 2025 Season 2 on at
    1. I would add a column to your spreadsheet named Row that contains this expression: =ROW(). This returns the current row number.
    2. You can then use the List rows present in a table action and add a filter query to where Row gt 7.
    3. Add an Apply to each action set to the data from step 2.
    4. In the Apply to each, add a Delete a row action and set the Key to Row and the value to the Row value of the current item
    If the spreadsheet could have more than 250 rows, you'll need to enable pagination.

    When posting questions, you need to realize that virtually nobody will know who you are referring to when you include this in your post: "I've seen posts from @AJA21 & @Sunshine Gu with no resolution?" Just post your question and provide screen shots of your flow along with any error messages instead.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard