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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Delete Multiple Excel ...
Power Automate
Answered

Delete Multiple Excel Worksheets in one go

(0) ShareShare
ReportReport
Posted on by 231

Hi,

I have a Excel Workbook with 6 Excel Worksheets say 1,2,3,4 5 and 6.

I would like to delete 5 worksheets - say 1,2,3 4, and 6 in 1 one go and keep only worksheet 6 in the Excel Workbook.

 

Although there is a "Delete Worksheet" option (not Worksheets) in PAD, i would not like to place this 5 times and would like to go for deleting 5 Excel worksheets in 1 go.

 

Any idea will help

I have the same question (0)
  • AS-06081019-0 Profile Picture
    1,736 Super User 2024 Season 1 on at

    @SA_VOH Please refer below

     

    Ankesh_49_0-1657803033895.png

     

  • SA_VOH Profile Picture
    231 on at

    Hi Ankesh,

    Prima faice i have looked into your solution.

    Thanks for the solution, I would like to retain Sheet 4 and delete all other worksheets.

    So, i think that  the Code should be CurrentItem <>  Sheet 4.

    Please confirm

  • AS-06081019-0 Profile Picture
    1,736 Super User 2024 Season 1 on at

    Yes. Correct

    Ankesh_49_0-1657819787800.png

     

    Hope it helps!!

     

    Cheers,

    Ankesh

    --------------------------------

    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

  • SA_VOH Profile Picture
    231 on at

    Hi Ankesh,

    Ok.

    Further, i think that i can do away with Display Message Loop and For Each Loop.

    Only If- else Loop is sufficient, any comments please.

  • Verified answer
    AS-06081019-0 Profile Picture
    1,736 Super User 2024 Season 1 on at

    Here you go, below is what you can replicate at your end.

     

    Ankesh_49_0-1657820843550.png

     

    Hope it helps!!

     

    Cheers,

    Ankesh

    --------------------------------

    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

  • SA_VOH Profile Picture
    231 on at

    Hi Ankesh,

    Thanks, i accepted your solution.

    But i require 1 help in this flow.

    What if i want to preserve 2 Excel Sheets say Excel Sheet 4 and 5 instead of Excel Sheet 4 only.

    What is the change then required in the If-Code?

    Please help

  • Verified answer
    AS-06081019-0 Profile Picture
    1,736 Super User 2024 Season 1 on at

    Here you go:

     

    Ankesh_49_0-1657903639935.png

     

    Hope it helps!!

     

    Cheers,

    Ankesh

    --------------------------------

    If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

  • SA_VOH Profile Picture
    231 on at

    Thanks Ankesh_49, it worked. And i have marked it as Solution.

  • AS-06081019-0 Profile Picture
    1,736 Super User 2024 Season 1 on at

    Awesome. Glad it helped @SA_VOH 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard