What is the XLAM file format?
.xlam files store add-ins for Microsoft Excel, providing new features and functionality through VBA macros exposed as custom functions, ribbon commands, or automation routines. The .xlam format complies with the Office Open XML standard - .xlsx and .xlsm files also use this standard. Packaged as a ZIP archive of XML parts alongside a binary xl/vbaProject.bin stream, .xlam is the direct Open XML successor to the older binary .xla add-in. Support was introduced with Excel 2007 as part of the ECMA-376 / ISO/IEC 29500 OOXML specification, and the format remains fully current in Microsoft 365.
Excel add-ins
Excel add-ins can be divided into groups based on their file format and the type of functionality they offer. Unlike a plain .xlsx workbook, an .xlam file must contain macros - carrying VBA code is its defining purpose. Excel loads .xlam files in the background as hidden workbooks; the macros and custom functions they expose are available to any open workbook regardless of that workbook's own file format. The predecessor .xla format served the same role in binary form before the Open XML era.
Security & safety
RISK: HIGHAn XLAM always contains executable VBA, and Excel runs an enabled add-in's code automatically every time it starts - there is no per-open "enable macros" prompt once you've trusted it. That makes a malicious XLAM more dangerous than a one-off XLSM. Rules: only install add-ins from authors you trust, prefer digitally signed ones, and inspect an unknown XLAM first (rename to .zip and look at vbaProject.bin / customUI). Keep them in Excel's Trusted Locations rather than lowering macro security globally. Treat an unexpected .xlam attachment the same as any executable.
Format details
in a nutshellPrograms that open XLAM files
Technical details
deep spec| Container format | ZIP archive (Open Packaging Conventions / OPC); same structural envelope as .xlsx and .xlsm, distinguished by its declared content type inside the package |
| File signature (magic bytes) | 50 4B 03 04 ("PK") at offset 0 - identical to any ZIP; distinguished internally by [Content_Types].xml declaring the add-in content type and the presence of xl/vbaProject.bin |
| MIME type | application/vnd.ms-excel.addin.macroEnabled.12 |
| Internal content type | application/vnd.ms-excel.addin.macroEnabled.main+xml, declared in [Content_Types].xml inside the OPC package |
| VBA binary stream | xl/vbaProject.bin - an OLE2 compound document embedded inside the ZIP that holds all VBA module source code and compiled p-code |
| XML encoding | UTF-8 for all XML parts; binary for xl/vbaProject.bin and any embedded images or OLE objects |
| Compression | DEFLATE per ZIP entry; XML parts are compressed, binary streams (vbaProject.bin) may be stored uncompressed |
| Encryption | Optional ECMA-376 Agile Encryption (AES-256) for the whole package when saved with a password; VBA project can also be separately password-protected using a legacy RC4-based lock |
| Code signing | Supports Office digital signatures for the VBA project and/or the OPC package, enabling macro trust without fully disabling Excel security prompts |
| Typical file size | 20 KB to several MB depending on the volume of VBA code and any embedded resources such as images or XML schemas |
| Load behavior | Loaded by Excel in the background as a hidden workbook; its functions and macros are globally available to all open workbooks without appearing in the workbook window list |
| Internal version designator | macroEnabled.12 - the "12" refers to Office 2007 (internal build Office 12); the OPC package structure has not changed major version since introduction |
| Predecessor format | .xla - binary OLE2-based Excel add-in used before Excel 2007; .xlam replaces it with an Open XML container while retaining VBA as the macro language |
| Platform support | Windows (full VBA and add-in management support) and macOS (Excel for Mac runs .xlam with VBA, though some Windows-specific API calls may not be available) |
| Released | 2007 (Excel 2007); part of ECMA-376 / ISO-IEC 29500 OOXML |
| Latest version | Same OPC/OOXML package format since Excel 2007; current in Microsoft 365 |
| Open standard | Yes · royalty-free |
| Specification | learn.microsoft.com |
XLAM conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about XLAM files.