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

Community site session details

Session Id :
Power Automate - Building Flows
Suggested answer

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!
I have the same question (0)
  • Suggested answer
    David_MA Profile Picture
    12,515 Super User 2025 Season 2 on at
    delete all but 1st row in table
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 647 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 350 Moderator

#3
developerAJ Profile Picture

developerAJ 256

Last 30 days Overall leaderboard