How to use macro-enabled files in Power Automate flows

Power Automate flows support .xlsm files in the Excel Online (Business) connector.

Important

The macros contained in the .xlsm files cannot be run through Power Automate. Only Office Scripts are enabled there.

The Run script action lets you select .xlsm files. Other connector actions require you use the file ID. Get this ID with the Get File Metadata action from either the OneDrive for Business or SharePoint connectors. Use the ID dynamic content returned from the Get file metadata action as the "File" argument for Excel connector actions.

Warning

Some .xlsm files, especially those with ActiveX or Form controls, may not work in the Excel online connector. Be sure to test before deploying your solution.

See also