Sign up for Office 365
Learn more about Office 365
Macro-enabled workbooks (.xslm files) cannot be opened in Excel Online. To open workbooks and run the macros they contain, use the desktop Excel application. When you try opening a macro-enabled workbook in Excel Online, you'll see a message that tells you the workbook contains a VBA project. To open the workbook and run the macros, click Cancel in the message and then click Open in Excel.
If you can use the content of the workbook without running the macros, you can let Excel Online remove the macros by clicking Edit in the browser in the message. That way, you can use Excel Online to access the data. You can get back to the original workbook by going to a previous version of the file. In the document library, click the Open Menu dots next to the file name, click the Open Menu dots in the workbook preview, and then click Version History.
For more information about feature support in Excel Online, see Edit a workbook that contains features unsupported by Excel Web App.