logo
search
Office Compatibility Issues

How to Fix Excel Add-in Errors Opening XLSM Files on the Web

Khadija KhanKhadija Khan Oct 8, 2026 870 views

Question details

Users experience failures when an Excel JavaScript add-in attempts to open XLSM files in Excel for the web.

How to Fix Excel Add-in Errors Opening XLSM Files on the Web
Product
Excel for the Web
Device & OS
not provided
Scenario
Using an Excel JavaScript add-in to create or open an XLSM workbook via the Excel.createWorkbook API in a web browser.
Observed behavior
The XLSM file opens successfully in the desktop version of Excel, but the add-in fails or throws an error when executing the same operation in Excel for the web.
Before you start

Verify whether your workbook explicitly requires VBA macros to function, as web environments natively restrict macro execution for security and architectural reasons.

Solution 1Recommended

Convert the XLSM File to XLSX Format

Since Excel for the web does not support running macros, saving the file as a standard XLSX format avoids the compatibility conflict causing the add-in to fail.

Excel for the web has highly limited support for XLSM files. While you can view them, background macros cannot run. When you use the Excel.createWorkbook API via a JavaScript add-in on an XLSM file, this web limitation often triggers an unexpected failure.

1
Open in Desktop

Launch the original XLSM file using your desktop version of Microsoft Excel.

2
Save As New Format

Click on 'File' in the top left corner, select 'Save As', and choose your preferred destination.

3
Select XLSX

In the file format drop-down menu, choose 'Excel Workbook (*.xlsx)' and click 'Save'.

4
Update Add-in Code

Modify your JavaScript add-in's code to target the newly created XLSX file instead of the unsupported XLSM file.

Convert the XLSM File to XLSX Format
Macro Removal: Saving a workbook as an XLSX file permanently removes its VBA macros. If your add-in relies on that logic, you will need to redesign it using Office Scripts or standard JavaScript APIs.
Free Microsoft Office alternative

Handle Macro-Enabled Workbooks Smoothly with WPS Office

If web-based Excel limitations are slowing down your workflow, consider using WPS Office. It provides a robust, desktop-grade spreadsheet environment that natively handles complex formatting and macro-enabled files without the hassle of web restrictions.

  1. 1. Download the Installer: Visit the official WPS Office website and download the free version tailored for your operating system.
  2. 2. Install WPS Office: Run the setup file and follow the brief on-screen instructions to complete the lightweight installation.
  3. 3. Open Your XLSM Files: Launch WPS Spreadsheets, click 'Open', and select your macro-enabled workbook to begin editing without web-based compatibility errors.
High compatibility with Microsoft Excel formats, including .xlsx, .xlsm, and .xlsPowerful desktop spreadsheet capabilities without web-based API restrictionsLightweight architecture that installs quickly and runs smoothly on older hardwareFamiliar tabbed interface requiring zero learning curve for Excel users
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel.createWorkbook fail specifically with XLSM files on the web?

Excel for the web restricts macro execution for security and performance reasons. When an add-in tries to generate or interact deeply with an XLSM file via the createWorkbook API, the web architecture rejects it, causing the add-in to throw an error.

Can I run VBA macros in Excel for the web if I change my browser settings?

No, VBA macros cannot run in Excel for the web regardless of your browser settings. The web application simply lacks the VBE (Visual Basic Environment) engine required to interpret and execute VBA code.

How do I replace my VBA macros for users restricted to Excel for the web?

To automate tasks for web users, you should migrate your existing VBA scripts to Office Scripts (which use TypeScript) or rebuild the logic directly into your Excel JavaScript add-in.