Skip to main content
Power Automate
    • Connectors
    • Templates
    • Digital process automation
    • Robotic process automation
    • Business process automation
    • Process advisor
    • AI Builder
  • Pricing
  • Partners
    • Blog
    • Documentation
    • Roadmap
    • Self-paced learning
    • Webinar
    • Business process and workflow automation topics
    • Overview
    • Issues
    • Give feedback
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • User groups
    • Register
    • ·
    • Sign in
    • ·
    • Help
    Go To
    • Microsoft Power Automate Community
    • Welcome to the Community!
    • News & Announcements
    • Get Help with Power Automate
    • General Power Automate Discussion
    • Using Connectors
    • Building Flows
    • Using Flows
    • Power Automate Desktop
    • Process Advisor
    • AI Builder
    • Power Automate Mobile App
    • Translation Quality Feedback
    • Connector Development
    • Share, Chat, Discuss
    • Community Chat & Announcements
    • Off Topic Discussion
    • Power Platform Integration - Better Together!
    • Power Platform Integrations
    • Power Platform and Dynamics 365 Integrations
    • Galleries
    • Community Connections & How-To Videos
    • Webinars and Video Gallery
    • Power Automate Cookbook
    • 2021 MSBizAppsSummit Gallery
    • 2020 MSBizAppsSummit Gallery
    • 2019 MSBizAppsSummit Gallery
    • Ideas
    • Power Automate Ideas
    • Report Issues
    • I Found A Bug
    • Community Engagement
    • Community AMA
    • Community Blog
    • Power Automate Community Blog
    • Community Blog Topic Suggestions
    • Community Support
    • Community Accounts & Registration
    • Using the Community
    • Community Feedback
    cancel
    Turn on suggestions
    Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
    Showing results for 
    Search instead for 
    Did you mean: 
    • Microsoft Power Automate Community
    • Galleries
    • Power Automate Cookbook
    • Excel Batch Delete

    Excel Batch Delete

    06-20-2022 12:29 PM - last edited 06-30-2022 05:37 AM

    takolota
    Power Participant
    547 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    takolota
    takolota Power Participant
    Power Participant
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    Excel Batch Delete

    a week ago

    BatchDeleteForumThumbnail.png

    Excel Batch Delete (40x Faster)

    I plan to make an explanation video & then update this post within the next few weeks. For now I would really appreciate any testing & feedback on this flow.

     

    I was able to develop an Office Script to delete rows in Excel from Power Automate array data. So instead of a flow creating a new action API call for each individual row deletion, this flow can just send an array of deletion primary keys and the Office Script will match up primary key values and delete each row it finds.

     

    In testing the flow completes 1500 row deletions per minute, about 40x faster than the standard Excel delete row actions at max 50 concurrency. And it accomplished each 750 deletions with less than 8 actions or about 1% of the standard 750 action API calls.

     

    The "results" output of the Run script action returns the change in the number of rows, so the number of rows removed since the script started running.

    Version 1 was twice as fast as Version 2, but Version 1 could not delete rows with formulas. The design of Version 2 trades off some speed & efficiency so it can handle a wider range of use-cases like deleting rows with formulas.

     

    Office Script Code V2 (Also included in a Compose action at the top of the template flow)

    https://drive.google.com/file/d/1yLqB9Od_r3Mk9wvzBqubBO2bMzm4Ye3U/view?usp=sharing 

     

     

    You can download the Version 2 of this template attached to this post, copy the Office Script code into an online Excel instance, & try it out for yourself.
    -Open an online Excel workbook, go the the automate tab, select New Script, then copy & paste the Office Script code into the code editor. You may want to name the script BatchDeleteV2.
    -Once you get the template flow into your environment, follow the notes in the flow to change the settings to your datasources, data, & office scripts.

     

     

    ExcelBatchDeleteV2 is the core piece.
    ExcelBatchDeleteV2b includes a Do until loop set-up if you plan on deleting more than 750 rows in a single flow run. It also includes a set-up that can filter to just the rows in Excel that are not in another dataset.

     

    Thanks for any feedback!

    ExcelBatchDeleteV2.zip
    ExcelBatchDeleteV2b.zip
    Labels:
    • Labels:
    • Automated flows
    • Button flows
    • Scheduled flows
    Message 1 of 4
    547 Views
    1 Kudo
    Reply
    • All posts
    • Previous Topic
    • Next Topic
    takolota
    takolota Power Participant
    Power Participant
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    a week ago

    Excel Batch Create, Update, & Upsert Templates Here:

    https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Excel-Batch-Create-Update-and-Upsert/td-...

    Message 2 of 4
    545 Views
    0 Kudos
    Reply
    takolota
    takolota Power Participant
    Power Participant
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    a week ago

    @Yutao 

    Batch Delete V1 is now ready too.

    Message 3 of 4
    502 Views
    0 Kudos
    Reply
    takolota
    takolota Power Participant
    Power Participant
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    Tuesday

    Batch Delete Version 2

    Version 1 was twice as fast as Version 2, but Version 1 could not delete rows with formulas. The design of Version 2 trades off some speed & efficiency so it can handle a wider range of use-cases like deleting rows with formulas.

     

    Office Script Code V2 (Also included in a Compose action at the top of the template flow)

    https://drive.google.com/file/d/1yLqB9Od_r3Mk9wvzBqubBO2bMzm4Ye3U/view?usp=sharing 

    ExcelBatchDeleteV2b.zip
    ExcelBatchDeleteV2.zip
    Message 4 of 4
    38 Views
    0 Kudos
    Reply

    Power Platform

    • Overview
    • Power BI
    • Power Apps
    • Power Automate
    • Power Virtual Agents

    • Sign up free
    • Sign in

    Browse

    • Templates
    • Connectors
    • Partners

    Downloads

    • Mobile
    • Gateway

    Learn

    • Documentation
    • Learn
    • Support
    • Community
    • Give feedback
    • Blog
    • Pricing

    • © 2022 Microsoft
    • Contact us
    • Trademarks
    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Terms & conditions