XLSM Viewer
Read a macro-enabled workbook as data only. The sheets open in your browser, the macros stay inactive, and the file is not uploaded.
Updated
How to open an XLSM file without running macros
- Select Choose a file to view, or drag the .xlsm file onto the box.
- Select a sheet name above the grid to move between sheets. Hidden sheets are listed too.
- Type in Find in this sheet to show only the rows that contain a word or number.
That is the whole process. The viewer has no macro engine, so there is no setting to get wrong and no prompt to decline. If you would like to try it first, select Try a sample file.
What is an XLSM file
The M stands for macro-enabled. An .xlsm file is built the same way as an .xlsx file: a ZIP archive of XML files that describe the sheets, text and styles. The difference is one extra part inside the archive, xl/vbaProject.bin, which stores the VBA code along with any forms and modules.
Microsoft split the two extensions when it introduced the format in Excel 2007. A plain .xlsx can never hold macros, so the extension alone tells you whether a workbook might run code. An .xlsm is permitted to contain macros, and some contain none.
| Extension | What it is | Can hold macros |
|---|---|---|
| .xlsx | Standard workbook | No |
| .xlsm | Macro-enabled workbook | Yes |
| .xlsb | Binary workbook | Yes |
| .xls | Excel 97-2003 workbook | Yes |
| .xltm | Macro-enabled template | Yes |
| .xlam | Add-in | Yes |
Why macro files are a risk
A macro is a program. VBA can read and delete files, download other files, send email through Outlook and start other programs. Most macros do ordinary jobs such as formatting a report or importing a file. The same abilities make macro-enabled attachments a long-standing way to deliver malware, usually in a workbook that claims you must enable content to see an invoice or a delivery note.
Excel has several layers of defence:
- Protected View. Files from email and the web open read-only, with editing switched off.
- The yellow Security Warning bar. Macros stay disabled until you select Enable Content.
- Blocking of internet macros. For files marked as downloaded, current versions of Excel show a red bar and do not offer an enable button at all.
A sensible rule: read first, enable later. Open the file here or in Protected View, check that the sheets hold what you expected, and only then decide whether the macros are needed.
What the viewer reads and what it ignores
| In the .xlsm file | In the viewer |
|---|---|
| Cell values and dates | Shown as Excel displays them |
| Formulas | Their last saved result |
| VBA modules and forms | Ignored. Never loaded, never run |
| Buttons and form controls | Not drawn |
| Results a macro would produce | Only what was saved in the file |
| Charts, pictures, colours | Not drawn |
One consequence is worth knowing. Some workbooks fill their sheets when a macro runs at opening time, for example by pulling fresh figures from a database. The viewer shows the figures from the last time the file was saved, which may be older than you expect.
Checking macros safely in Excel
If you do need to know what the macros do:
- Open the workbook and leave the content disabled.
- Press Alt+F11, or go to Developer > Visual Basic.
- Read the modules listed under the workbook’s name in the project pane. Look closely at any procedure named
Workbook_OpenorAuto_Open, since those run by themselves when content is enabled.
Macro settings live under File > Options > Trust Center > Trust Center Settings > Macro Settings. The default, Disable VBA macros with notification, is the right choice for most people.
XLSM in Google Sheets and LibreOffice
Google Sheets opens an .xlsm file and shows its data, but it does not run VBA. Its own scripting language is Apps Script, and macros have to be rewritten to work there. LibreOffice Calc opens .xlsm files and can run some VBA code, with mixed results on anything complex.
Removing the macros
To pass the data on without the code, save a macro-free copy with File > Save As > Excel Workbook (*.xlsx). For one sheet of plain values, Excel to CSV does the same job in the browser.
Limits
- Files up to 50 MB.
- The preview covers the first 200 rows and 40 columns of each sheet. Search filters all rows.
- The VBA code is not displayed, and the file is not checked for malware. The viewer keeps macros from running. It does not tell you whether they are harmful.
- A workbook encrypted with a password to open cannot be read.
Questions
What is an XLSM file?
It is an Excel workbook that is allowed to contain macros, which are small programs written in VBA. Apart from the macro code it has the same structure as an .xlsx file, with the same sheets, formulas and limits.
Is it safe to open an XLSM file?
Reading the cells is safe. The risk is in running the macros, which can do anything a program can do on your computer. This viewer never runs them. In Excel, keep macros disabled unless you know who wrote the file and why it needs them.
How do I open an XLSM file without running macros?
Open it on this page, where macro code cannot run. In Excel, open the file and do not select Enable Content on the yellow bar. The sheets are readable either way.
Can I see the VBA code in the viewer?
No. The viewer shows the sheets and their values. To read the code, open the workbook in Excel with macros disabled and press Alt+F11 to open the Visual Basic editor.
How do I convert XLSM to XLSX?
In Excel, choose File > Save As and pick Excel Workbook (*.xlsx). Excel warns that the VBA project cannot be saved in a macro-free workbook. Select Yes and the copy is saved without macros.
Why does Excel block the macros in my file?
Excel blocks macros in files that came from the internet or an email attachment. If you trust the file, close it, right-click it in File Explorer, choose Properties, tick Unblock and select OK.