Skip to main content

Notifications

Community site session details

Community site session details

Session Id : /Pg0OETCO9ZJnRfAqsE2l6
Power Automate - Building Flows
Answered

Need help with steps to trigger a excel macro from Power Automate web

Like (0) ShareShare
ReportReport
Posted on 17 Jan 2023 11:34:28 by 14

Hi Folks,

 

I have a scenario that I need guidance with.

 

There is a excel file in SharePoint, that has some Macros in it. The requirement is to use Power Automate (Web version) to automatically trigger these macros to run daily.  I found some videos/resources but they point to the usage of Office Scripts template in a flow.  However this file doesnt have office scripts but macros. 

 

Can you help point to the steps for Power Automate web to trigger macros from excel? Any pointers would be appreciated.

 

Cheers guys,

  • Enzo7C4 Profile Picture
    4 on 06 Dec 2023 at 17:00:26
    Re: Need help with steps to trigger a excel macro from Power Automate web

    Hello! Did you find a workaround? I would also like to do the exact same thing as you! But I'm not familiar at all with scripts. Thank you!

  • vasuser1980 Profile Picture
    14 on 18 Jan 2023 at 09:55:53
    Re: Need help with steps to trigger a excel macro from Power Automate web

    ah that sounds a bit complex. Anyway thanks a ton mate. That atleast gives clarity on what is to be done.  Appreciate your quick responses 🙂

  • Verified answer
    OkanMTL Profile Picture
    703 Super User 2024 Season 1 on 18 Jan 2023 at 09:24:28
    Re: Need help with steps to trigger a excel macro from Power Automate web

    Hi,

    You can't directly convert Macro to Office Script. You have to Rewrite it in Office Script.

    Basically To convert an Excel macro to an Office Script, you will need to rewrite the macro code using JavaScript and the Excel JavaScript API. This can be a complex process and may require some programming knowledge.

  • vasuser1980 Profile Picture
    14 on 18 Jan 2023 at 09:18:11
    Re: Need help with steps to trigger a excel macro from Power Automate web

    Hi I had a quick look and that link explains how we can record, edit office scripts. It doesnt really give information on how to convert a macro to a office script (that can then be used in power automate web). 

  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on 18 Jan 2023 at 09:09:28
    Re: Need help with steps to trigger a excel macro from Power Automate web

    Hi,

     

    This is most of what you will need: https://learn.microsoft.com/en-us/javascript/api/office-scripts/overview?view=office-scripts

  • vasuser1980 Profile Picture
    14 on 18 Jan 2023 at 09:02:30
    Re: Need help with steps to trigger a excel macro from Power Automate web

    Hi Mate, thanks. Do you have any resource I can refer to, on how to do the first suggestion you gave me (ie, to convert the Macro to a Script)? I think you meant to convert the macro into a office script? If so can you point me to a resource I can refer and try it out?

  • OkanMTL Profile Picture
    703 Super User 2024 Season 1 on 17 Jan 2023 at 11:58:57
    Re: Need help with steps to trigger a excel macro from Power Automate web

    Hi,

     

    There is none. You will need Desktop to do it. But i guess you already knew.

    Why not translate your Macro to a Script and then run it from Web?

     

    Another option is to run an Excel Macro with another program like Powershell or Python. Those are free, and loads of documentation for it to run an Excel Macro online 🙂 Here you could also run these daily. A little bit more technical, but it is a solution.

     

     

    Good luck.

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,786 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,093 Most Valuable Professional

Leaderboard