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,
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!
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 🙂
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.
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).
Hi,
This is most of what you will need: https://learn.microsoft.com/en-us/javascript/api/office-scripts/overview?view=office-scripts
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?
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.
WarrenBelz
146,786
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,093
Most Valuable Professional