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 / PAD updating Excel fil...
Power Automate
Unanswered

PAD updating Excel file with Data Refresh All including Power Query items.

(0) ShareShare
ReportReport
Posted on by 13

What is the right way to have Power Automate Desktop "End" after it has done the expected steps?
I have PAD opening an Excel file on SharePoint and starting a macro.

The macro is running successfully but it takes time to complete.

After that PAD doesn't need to do anything more.

I would like PAD to recognize it's work is done and not have to set a WAIT time.

There appear to be no way for PAD to recognized when the macro has been completed (and/or the data refresh has completed.

 

Flow:

mdfreeman_2-1714090951888.png

 

Macro in Excel

mdfreeman_1-1714090779738.png

 

 

I have the same question (0)
  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @mdfreeman 

     

    I believe it's getting failed during execution of macro function.

    Try to use below highlighted toggle enabled while you launch you excel and execute the macro action. 

    Deenuji_1-1714101807704.png

     

    And another workaround is , As @Agnius mentioned in the below post

     

    1. Use Launch Excel making the instance visible, and then use Press button in window or Click UI element in window to click on the Enable button in Excel to enable macros.
    2. Use scripting (Run PowerShell script or Run VBscript) to run Excel with macros enabled (passing that as the parameter of the script) and then use Attach to running Excel to attach to it.

    Excel Macros will not run when opened with PAD onl... - Power Platform Community (microsoft.com)

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

     

  • mdfreeman Profile Picture
    13 on at

    Thank you for the suggestion.

     

    The macro was completing but I believe that PAD was timing out since it could not recognize if the macro was still running.


    Solutions:

    Made a few changes to both PAD flow and the macro in Excel.

    I added the "Automation - Wait for Image" step based on suggestion by @Benny_1857 in this thread Solved: Re: Using Power Automate Desktop to refresh Excel ... - Power Platform Community (microsoft.com)

     

    The two to other waits are to give Excel a change to get the macro moving.

     

    mdfreeman_1-1714280433512.png

     

     

    mdfreeman_0-1714280357333.png

     

     

  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @mdfreeman 

     

    Thank you for sharing your insights and tips on how you're addressing your reported issues. Please mark your above answer as the solution for this topic.

     

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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 791

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 535

Last 30 days Overall leaderboard