Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:OOXML

From ReverseEngineering.wiki
Format
Versions ECMA-376 editions 1 to 5
Magic 50 4B 03 04 (ZIP local header) with an entry named [Content_Types].xml
Extensions .docx, .xlsx, .pptx, .docm, .xlsm, .vsdx, .xps (OPC family)
On this wiki Facts · Code · Notes · Topics

Office Open XML (ECMA-376 / ISO 29500): .docx, .xlsx, .pptx and related files are Open Packaging Conventions packages, ZIP archives of XML parts and relationships; identify them as a ZIP whose entries include [Content_Types].xml and _rels/.rels, then by the main part (word/, xl/, ppt/).

Overview

OOXML documents are Format:ZIP files in the Open Packaging Conventions (OPC) layout. .NET's System.IO.Packaging documentation states that ZIP is the primary physical format of a package, that the package holds parts (each with a content type) and relationships (package-level and part-level) that associate a source with a target part, and points to ECMA-376 for the specification. XPS documents use the same package architecture.

Identification

  • Unverified: the content types part is named [Content_Types].xml at the archive root and the package-level relationships are in _rels/.rels; the main document part is then found by the relationship of type officeDocument (word/document.xml for .docx, xl/workbook.xml for .xlsx, ppt/presentation.xml for .pptx). This is common knowledge and was not read in a source for this page.
  • Legacy .doc, .xls, .ppt are not OOXML: they are Format:Compound File Binary files.
  • An OOXML file protected with a password is not a ZIP: Unverified: it is a Compound File Binary holding EncryptedPackage and EncryptionInfo streams.

Reversing notes

  • Macros live in a vbaProject.bin part, itself a Compound File Binary (Unverified).
  • Parts compressed with deflate: see Format:Zlib stream for the framing differences (ZIP uses raw deflate).