Skip to content

XLSM · 5 XLSM workbooks

Sample XLSM Macro-Enabled Workbooks

Download free, validated XLSM (.xlsm) sample workbooks for testing antivirus gateways, upload filters, VBA macros, and OpenXML parsers from 100 to 2,500 rows.

5 XLSM workbooks 100 – 2,500 rows · 19 KB – 101 KB VBA Enabled · ISO/IEC 29500

Direct Downloads

Available XLSM Sample Workbooks

5 XLSM workbooks

100 rows

18.9 KB

100 Rows Auto-Sum & Sales Tax Macro

Macro Capability:Auto-Sum & Sales Tax

XLSM Download XLSM

250 rows

24.2 KB

250 Rows Dynamic Format & Zebra Styler

Macro Capability:Zebra Shading & Table Styler

XLSM Download XLSM

500 rows

41.0 KB

500 Rows Custom UDF Metric Converter

Macro Capability:Custom User-Defined Functions (UDF)

XLSM Download XLSM

1,000 rows

49.1 KB

1,000 Rows Commercial Invoice Aggregator

Macro Capability:Multi-Sheet Invoice Summary

XLSM Download XLSM

2,500 rows

99.0 KB

2,500 Rows Customer Directory Normalizer

Macro Capability:Data Normalizer & Sanitizer

XLSM Download XLSM

XLSM Technical Architecture

Technical Reference & Security Testing Guide for XLSM Workbooks

XLSM (Excel Macro-Enabled Workbook) is an Open Packaging Conventions (OPC) spreadsheet container defined under ISO/IEC 29500 and ECMA-376. It pairs standard OpenXML spreadsheet parts with an embedded binary storage stream containing Microsoft Visual Basic for Applications (VBA) macro routines. XLSM test files are essential for testing corporate email security gateways, cloud upload filters, anti-malware sandboxes, and modern spreadsheet automation tools.

Origin & Security Separation: Why Microsoft Split XLSX and XLSM

Throughout the 1990s and early 2000s, legacy Microsoft Excel binary files (.xls) stored both tabular worksheet data and executable VBA macros inside the same OLE Compound Document container. This design flaw enabled destructive macro viruses (such as Concept, Laroux, and Melissa) to propagate covertly through innocent-looking spreadsheets.

With the release of Microsoft Office 2007 and the standardization of Office Open XML (ISO/IEC 29500), Microsoft introduced a mandatory architectural separation between pure data spreadsheets (.xlsx) and macro-enabled workbooks (.xlsm).

In this security architecture, standard .xlsx files strictly forbid executable macro code—if a user attempts to save VBA code into an .xlsx file, Excel immediately strips the project and alerts the user. Conversely, the .xlsm extension explicitly announces the presence of executable VBA routines, allowing corporate firewalls, proxy gateways, and antivirus engines to inspect or quarantine files based on file extension and MIME declaration.

Under the Hood: Open Packaging Conventions & vbaProject.bin

An XLSM file is an industry-standard ZIP archive containing structured XML documents and a dedicated binary stream:

Macro-Specific MIME Override

Inside [Content_Types].xml, the workbook part is explicitly assigned the MIME type application/vnd.ms-excel.sheet.macroEnabled.main+xml, replacing the standard xlsx MIME type.

The vbaProject.bin Binary Stream

All Visual Basic code, user form interfaces, and compiled p-code tokens are packaged in xl/vbaProject.bin, a Compound File Binary Format (CFBF) stream conforming to the Microsoft [MS-OVBA] specification.

Explicit Relationship Definitions

The relationship file xl/_rels/workbook.xml.rels includes a formal target relationship: http://schemas.microsoft.com/office/2006/relationships/vbaProject referencing vbaProject.bin.

Harmless Synthetic Test Macros

All sample files on TestingFile contain 100% benign, harmless utility macros (such as sum calculators, zebra-striping formatters, and unit conversions) that perform zero external network, file system, or shell operations.

Security Comparison: XLSX vs XLSM vs XLS

Understanding how different spreadsheet formats treat executable macro content is vital for secure file ingestion architecture:

Security FeatureXLSX (.xlsx)XLSM (.xlsm)
Macro Execution Support XLSX provides total safety from macro malware; XLSM requires Trust Center or gateway scrutiny.Prohibited (code is stripped on save)Supported (stored in vbaProject.bin)
Content Type Declaration Allows network security filters to block macro files without inspecting full file bodies.sheet.main+xmlsheet.macroEnabled.main+xml
Legacy Binary Storage The vbaProject.bin component utilizes OLE structured storage inside the modern ZIP envelope.Pure OpenXML ZIP structureOpenXML ZIP + OLE CFBF stream
Default Office Trust Policy Downloaded XLSM files display yellow security banners or red blocks unless explicitly unblocked.Opens directly without macro warningsBlocked by Mark-of-the-Web (MOTW)

QA Testing & Gateway Inspection Checklist

When evaluating file upload portals, antivirus pipelines, or spreadsheet parsers using XLSM files, verify the following verification criteria:

  • Confirm upload firewalls accurately inspect MIME type application/vnd.ms-excel.sheet.macroEnabled.main+xml rather than trusting file extensions alone.
  • Verify that antivirus scanners and sandboxes inspect the internal xl/vbaProject.bin stream without crashing or failing on compressed archives.
  • Test server-side parsers (such as OpenPyXL, Apache POI, or EPPlus) to confirm whether keep_vba=True preserves macros or safely strips them during round-trip processing.
  • Check whether email gateways properly quarantine incoming attachments with .xlsm extensions or enforce digital signature policies.
  • Validate error messaging shown to end users when an upload form deliberately restricts macro-enabled workbooks for security compliance.
  • Verify that client-side spreadsheet viewers (e.g., Univer, Handsontable, or SheetJS) gracefully render worksheet cells while ignoring or notifying users about unexecutable VBA macros.

XLSM Technical Specifications

Standard Specification
ISO/IEC 29500 / ECMA-376 / Microsoft [MS-OVBA]
MIME Media Type
application/vnd.ms-excel.sheet.macroEnabled.main+xml
File Extension
.xlsm
Container Architecture
Open Packaging Conventions (OPC) ZIP Package
Macro Storage Part
xl/vbaProject.bin (Compound File Binary Format)
First Introduced
Microsoft Office 2007 (Windows & Mac)
Default Office Security
Mark-of-the-Web (MOTW) macro execution lock

About the XLSM format

XLSM is the macro-enabled spreadsheet workbook format from the Office Open XML family, supporting embedded Visual Basic for Applications (VBA) code.

Macro-enabled OpenXML package

An XLSM file uses the standard Open Packaging Conventions (OPC) ZIP architecture, storing spreadsheet data alongside a dedicated vbaProject.bin binary storage stream.

Security separation from XLSX

Microsoft Office 2007 introduced the .xlsm extension to explicitly distinguish macro-enabled files from benign .xlsx files, allowing email filters and upload gateways to inspect or quarantine executable code.

Enterprise automation & UDFs

XLSM files power legacy and corporate automated workflows, user-defined functions (UDF), and interactive financial models across Microsoft Excel and compatible spreadsheet engines.

Source article: Wikipedia: Office Open XML

Frequently Asked Questions About XLSM Files

What is an XLSM file and how does it differ from XLSX?+

An XLSM file is an Excel spreadsheet that contains embedded Visual Basic for Applications (VBA) macro code. While standard .xlsx files strictly prohibit macro code for security, .xlsm files include a dedicated xl/vbaProject.bin binary stream that allows macros to automate repetitive calculations, formatting, or data generation.

Are the macros inside these sample XLSM files safe to open?+

Yes, absolutely. All macros in our sample workbooks are 100% benign, harmless utility scripts designed strictly for testing. They perform basic spreadsheet operations like calculating column totals, applying table colors, and computing unit conversions. They do not contain any network requests, file system modifications, or shell commands.

Why does Excel show a security warning when opening an XLSM file?+

Microsoft Excel applies "Mark of the Web" (MOTW) security protection to any file downloaded from the internet. When you open an XLSM file from the web, Excel disables macros by default to protect you against malicious scripts. You can click "Enable Content" if you wish to run the test macros, or inspect the VBA code safely via Alt + F11.

Can open-source libraries like OpenPyXL read and write XLSM files?+

Yes. In Python, OpenPyXL supports XLSM workbooks when loaded with load_workbook(filename, keep_vba=True). This allows Python scripts to read data, update cells, and save the workbook while preserving the original vbaProject.bin macro code intact.

Why do developers and QA engineers need sample XLSM files?+

Developers and security teams use sample XLSM files to test web upload security filters, verify whether enterprise email gateways correctly quarantine executable files, benchmark antivirus sandbox scanners, and ensure spreadsheet conversion pipelines handle macro-enabled files according to company policy.