Fix Microsoft 365 Error When Editing Macro-Enabled Workbooks
Question details
The user is unable to open and edit a macro-enabled Excel workbook (.xlsm) in Microsoft 365 online due to file conversion failures related to VBA content.

- Product
- Microsoft 365
- Device & OS
- not provided
- Scenario
- Attempting to open and edit a macro-enabled Excel workbook online using Microsoft 365 for the web.
- Observed behavior
- Microsoft 365 displays the error message: "Sorry, we weren't able to convert the file for editing."
Verify that the workbook comes from a trusted source, as enabling macros from unknown files can expose your system to malicious VBA code and security risks.
Download and Edit in the Desktop Version of Excel
Since Excel for the web cannot fully process or edit VBA macros, downloading the file to a desktop application bypasses the online conversion error.
Microsoft 365 online has strict limitations regarding VBA (Visual Basic for Applications). If a workbook contains complex macros or specific VBA triggers, the online converter will block the file from opening to prevent corruption or security issues.
To resolve this, you must edit the file locally on a desktop application that fully supports macros.
In Microsoft 365 online or OneDrive, locate the problematic .xlsm file. Click on the three dots (More options) next to the file name and select 'Download'.
Locate the downloaded file in your computer's Downloads folder and double-click it to open it in your desktop version of Microsoft Excel.
If a yellow security warning appears at the top of the spreadsheet indicating that macros have been disabled, click the 'Enable Content' button to activate the VBA code.

Adjust Excel Trust Center Macro Settings
Modify your desktop Excel settings to ensure macros are properly enabled, which can prevent read-only or blocked-content issues when opening downloaded files.
Save a Copy Without Macros (.xlsx)
If you do not need the macros to function while editing online, saving the file in the standard .xlsx format will eliminate the conversion error.
Edit Macro-Enabled Workbooks Seamlessly with WPS Office
Struggling with Microsoft 365 online conversion errors? WPS Office is a free, lightweight desktop alternative that natively supports opening, editing, and running VBA macros without the restrictions of web-based editors.
- 1. Download and Install: Visit the official WPS Office website to download the free, lightweight desktop suite.
- 2. Open your macro workbook: Launch WPS Spreadsheets and open your .xlsm file directly without worrying about web-based format conversion failures.
- 3. Enable macros: Simply click 'Enable Macros' when prompted by the security warning to safely run your VBA scripts and start editing.

Frequently Asked Questions
Why does Microsoft 365 online fail to open macro-enabled workbooks?
Excel for the web lacks the backend processing required to run or edit Visual Basic for Applications (VBA) code. When an .xlsm file contains complex macros or specific security triggers, the online converter cannot safely process it, resulting in the "unable to convert" error.
Can I edit VBA code directly in Excel online?
No, VBA editing and execution are not supported in Excel for the web. To view, modify, or run macros, you must open the workbook in a desktop spreadsheet application like Microsoft Excel or WPS Office.
How do I remove macros from my workbook so I can edit it online?
Open the workbook in a desktop version of Excel, go to 'File' > 'Save As', and change the file format from 'Excel Macro-Enabled Workbook (*.xlsm)' to a standard 'Excel Workbook (*.xlsx)'. This strips the macros from the file, allowing flawless online editing.
Is it safe to enable all macros in the Trust Center?
No, it is generally unsafe. Enabling all macros automatically permits any VBA code to run, which can expose your computer to malware or viruses embedded in downloaded files. Always use the 'Disable VBA macros with notification' setting so you can manually approve trusted files.




