# Office Open XML

**Office Open XML**（OOXML）是一族基于 XML 的文件格式，用于文字处理文档、电子表格和演示文稿，经 ECMA-376 和 ISO/IEC 29500 标准化，自 Office 2007 起作为 [Microsoft Office](https://www.edgepedia.org/zh/microsoft-office) 各应用程序的默认文件格式，扩展名分别为 .docx、.xlsx 和 .pptx。<sup>[1](https://www.loc.gov/preservation/digital/formats/fdd/fdd000395.shtml)</sup><sup> • </sup><sup>[2](https://support.microsoft.com/en-us/office/collab-files/learn-about-file-formats)</sup> 该格式族由微软设计，旨在匹配 Office 2003 及之前各版本所使用的专有二进制格式（.doc、.xls、.ppt）的功能，同时与既有文档语料保持兼容。<sup>[1](https://www.loc.gov/preservation/digital/formats/fdd/fdd000395.shtml)</sup>

| 关键事实 | 详情 |
|---|---|
| 标准 | ECMA-376（2006 年 12 月批准）与 ISO/IEC 29500（2008 年批准）；由 ISO/IEC JTC 1/SC 34/WG 4 维护<sup>[1](https://www.loc.gov/preservation/digital/formats/fdd/fdd000395.shtml)</sup><sup> • </sup><sup>[3](https://www.ecma-international.org/wp-content/uploads/OfficeXML-White-Paper-v2008-10-03.pdf)</sup> |
| 主要格式 | DOCX（WordprocessingML）、XLSX（SpreadsheetML）、PPTX（PresentationML），以及启用宏的变体 .docm、.xlsm、.pptm<sup>[1](https://www.loc.gov/preservation/digital/formats/fdd/fdd000395.shtml)</sup> |
| 容器 | 开放打包约定（OPC），一种基于 ZIP 的包，定义于 ISO/IEC 29500-2，压缩算法限于 deflate<sup>[4](https://www.loc.gov/preservation/digital/formats/fdd/fdd000363.shtml)</sup> |
| Strict 与 Transitional | 符合第 1 部分的文件称为“Strict”；符合第 4 部分的文件允许遗留标记与向后兼容标记，称为“Transitional”<sup>[1](https://www.loc.gov/preservation/digital/formats/fdd/fdd000395.shtml)</sup> |
| 默认地位 | Open XML 格式（.docx/.xlsx/.pptx）是所有受支持版本的 Microsoft Office 中的默认格式<sup>[2](https://support.microsoft.com/en-us/office/collab-files/learn-about-file-formats)</sup> |
| 当前版本 | ECMA-376 第 5 版，2021 年 12 月，共四部分；ISO/IEC 29500-1 与 29500-4 的修订版处于 DIS 投票阶段，投票于 JTC 1 2025 年 11 月全会期间结束<sup>[5](https://ecma-international.org/publications-and-standards/standards/ecma-376/)</sup><sup> • </sup><sup>[6](https://assets.iec.ch/further_informations/3408/ISO-IEC%20JTC%201_N17594_SC%2034%20Business%20Plan%202025.pdf)</sup> |
| 保存状态 | 美国国会图书馆推荐格式声明将 OOXML 列为数字形式文本作品与电子连续出版物的可接受格式<sup>[1](https://www.loc.gov/preservation/digital/formats/fdd/fdd000395.shtml)</sup> |

## 历史与标准化

标准化工作始于 2005 年 12 月，当时 [Ecma International](https://www.edgepedia.org/zh/ecma-international) 成立第 45 技术委员会（TC45），审查微软提交的规范。TC45 的成员包括 Apple、巴克莱资本、BP、大英图书馆、依视路、英特尔、微软、NextPage、Novell、Statoil、东芝和美国国会图书馆的代表。<sup>[3](https://www.ecma-international.org/wp-content/uploads/OfficeXML-White-Paper-v2008-10-03.pdf)</sup> 该委员会汇集了多方专长：Microsoft Office 的大型企业客户、开发读取与转换办公文档产品的软件厂商，以及关注长期保存的档案机构。<sup>[1](https://www.loc.gov/preservation/digital/formats/fdd/fdd000395.shtml)</sup>

**批准与 ISO 快速通道。** 成果于 2006 年 12 月获批为 ECMA-376，并于 2007 年 1 月通过快速通道程序作为 DIS 29500 提交给 [ISO/IEC JTC 1](https://www.edgepedia.org/zh/iso-iec-jtc-1)。函投阶段收到各国团体提出的 3,522 条意见，处理结果载于 2008 年 1 月 14 日发布的《意见处置报告》，随后于 2008 年 2 月底在日内瓦举行投票解决会议。该标准满足批准标准：参与投票的 JTC 1 成员中 75% 投赞成票，各国成员团体中 14% 投反对票，随后于 2008 年作为 ISO/IEC 29500 出版。<sup>[3](https://www.ecma-international.org/wp-content/uploads/OfficeXML-White-Paper-v2008-10-03.pdf)</sup><sup> • </sup><sup>[1](https://www.loc.gov/preservation/digital/formats/fdd/fdd000395.shtml)</sup>

ISO 修订重构了规范。支持三大内容类别功能需求的标记与支持向后兼容遗留格式的标记被分开，遗留材料记录在一个题为“过渡迁移特性”的新部分中。<sup>[1](https://www.loc.gov/preservation/digital/formats/fdd/fdd000395.shtml)</sup>

## 标准的结构

ECMA-376 与 ISO/IEC 29500 定义了 Office Open XML 的词汇表、文档表示与打包方式，以及格式消费者与生产者的要求。当前 ECMA 版本包含四个部分，其中只有第 2 部分在最新版标准中获得采纳。<sup>[5](https://ecma-international.org/publications-and-standards/standards/ecma-376/)</sup> 主要部分如下：

- **第 1 部分，基础与标记语言参考**，定义文字处理、电子表格和演示文稿文档的 XML 词汇表。其目标包括忠实表示 Microsoft Office 从 Office 97 到 Office 2008 所生成的文档语料。<sup>[7](https://www.iso.org/cms/%20render/live/en/sites/isoorg/contents/data/standard/07/16/71691.html?browse=ics)</sup>
- **第 2 部分，开放打包约定（OPC）**，定义一种通用的基于 ZIP 的容器，容纳称为“部件”的文件集合，并提供用于表达部件间关系、标识内容类型和存储数字签名的架构。<sup>[4](https://www.loc.gov/preservation/digital/formats/fdd/fdd000363.shtml)</sup>
- **第 3 部分，标记兼容性与可扩展性（MCE）**，定义约定，使较新应用程序版本创建的文档能被较早版本读取；例如，Office 2007 可以读取较新版本创建的文件，即使其中使用了标准未定义的文本样式或幻灯片切换效果。<sup>[8](https://wwws.loc.gov/preservation/digital/formats/fdd/fdd000396.shtml)</sup>
- **第 4 部分，过渡迁移特性**，记录 Transitional 文件中允许的遗留标记，包括 VML——一种已被 DrawingML 取代的弃用图形语言。<sup>[1](https://www.loc.gov/preservation/digital/formats/fdd/fdd000395.shtml)</sup>

**Strict 与 Transitional 符合性类别。** 符合第 1 部分的文件称为 Strict，符合第 4 部分的文件称为 Transitional。Strict 类别排除了专为与既有二进制文档向后兼容而设计的功能，因此技术面更小，新实现者更容易支持；微软的 Open XML SDK 可以将 ISO/IEC 29500 Strict 文件的命名空间映射到相应的 openxmlformats.org 命名空间，从而读取这些文件。<sup>[1](https://www.loc.gov/preservation/digital/formats/fdd/fdd000395.shtml)</sup><sup> • </sup><sup>[9](https://learn.microsoft.com/office/compatibility/office-file-format-reference)</sup><sup> • </sup><sup>[10](https://learn.microsoft.com/en-us/office/open-xml/about-the-open-xml-sdk)</sup>

## 包格式

Office Open XML 文档存储为基于 ZIP 文件格式 6.2.0 版构建的 OPC 包。一个名为 [Content_Types].xml 的必需部件列出包中所有其他部件的 MIME 类型和扩展名，一个名为 _rels/.rels 的文件定义与主文档部件的关系；每个部件都必须能通过跟踪关系被发现。<sup>[4](https://www.loc.gov/preservation/digital/formats/fdd/fdd000363.shtml)</sup> 因此，一个最小的 WordprocessingML 文档由三个部件组成：内容类型部件、包关系部件和包含文本的文档部件。<sup>[3](https://www.ecma-international.org/wp-content/uploads/OfficeXML-White-Paper-v2008-10-03.pdf)</sup>

OPC 将压缩限制为 deflate 算法，不允许 ZIP 规范本身定义的加密或数字签名机制，而是提供自己的签名机制。由于包是普通 ZIP 归档，将 .docx 文件的扩展名改为 .zip 即可用任何归档工具查看其内部 XML 部件。<sup>[4](https://www.loc.gov/preservation/digital/formats/fdd/fdd000363.shtml)</sup><sup> • </sup><sup>[11](https://www.microsoft.com/en-us/msrc/blog/2008/08/ms08-043-how-to-prevent-this-information-disclosure-vulnerability)</sup> OPC 自 2006 年首次发布以来一直保持向后兼容；后续版本仅限于澄清和更正。<sup>[4](https://www.loc.gov/preservation/digital/formats/fdd/fdd000363.shtml)</sup>

除 Office 文档外，OPC 还用作 Visio .vsdx 绘图、OpenXPS（.oxps）纸张文件、NuGet 包、SMPTE 媒体包（ST 2053:2011）以及 AutoCAD 设计 Web 格式（.dwfx）的容器。<sup>[4](https://www.loc.gov/preservation/digital/formats/fdd/fdd000363.shtml)</sup>

## 在 Microsoft Office 中的使用与扩展

自 Office 2007 起，文字处理、电子表格和演示文稿的默认格式一直是携带 .docx、.xlsx 和 .pptx 扩展名的 OPC 包，微软建议 Office 文件使用 Open XML 格式，除非有特定理由使用其他格式。<sup>[4](https://www.loc.gov/preservation/digital/formats/fdd/fdd000363.shtml)</sup><sup> • </sup><sup>[2](https://support.microsoft.com/en-us/office/collab-files/learn-about-file-formats)</sup> 启用宏的变体（.docm、.xlsm、.pptm）存储 [Visual Basic for Applications](https://www.edgepedia.org/zh/visual-basic-for-applications) 代码，模板变体（.dotx、.xltx、.potx）与相应文档格式共享结构。<sup>[9](https://learn.microsoft.com/office/compatibility/office-file-format-reference)</sup><sup> • </sup><sup>[1](https://www.loc.gov/preservation/digital/formats/fdd/fdd000395.shtml)</sup>

微软通过 Open Specifications 计划记录其在标准之外的实现。[MS-DOCX]、[MS-XLSX] 和 [MS-PPTX] 规范描述扩展 ISO/IEC 29500 XML 词汇表的元素和属性，[MS-OI29500] 记录产品已知偏离或扩展规范之处。<sup>[12](https://learn.microsoft.com/en-us/openspecs/office_standards/ms-offstandlp/d5784a8b-7070-466b-befa-b7bf3724c6f0)</sup><sup> • </sup><sup>[13](https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oi29500/)</sup> Open XML 标准本身声明的目的是将文档与创建它们的应用程序解耦，使其他软件可以在不丢失数据的情况下操作文档。<sup>[10](https://learn.microsoft.com/en-us/office/open-xml/about-the-open-xml-sdk)</sup>

**工具。** Open XML SDK 是 GitHub 上的开源项目，提供用于生成和操作文字处理文档、电子表格和演示文稿的类，包括根据 Open XML 格式的各种变体验证文档。<sup>[10](https://learn.microsoft.com/en-us/office/open-xml/about-the-open-xml-sdk)</sup><sup> • </sup><sup>[12](https://learn.microsoft.com/en-us/openspecs/office_standards/ms-offstandlp/d5784a8b-7070-466b-befa-b7bf3724c6f0)</sup> 在 Java 生态系统中，Apache POI 读写 OOXML 文件，需要从文件格式 XSD 编译的架构 jar 包。<sup>[14](https://poi.apache.org/help/faq)</sup>

## 互操作性与批评

2008 年，伊利诺伊大学的拉吉夫·沙阿和杰伊·凯桑 进行了一项研究，评估 ODF 与 OOXML 各实现之间的互操作性，发现两种格式都没有任何替代实现能与主导实现达到 100% 兼容，这表明需要改进互操作性测试。<sup>[15](https://experts.illinois.edu/en/publications/evaluating-the-interoperability-of-document-formats-odf-and-ooxml/)</sup> 开发 [LibreOffice](https://www.edgepedia.org/zh/libreoffice) 的[文档基金会](https://www.edgepedia.org/zh/the-document-foundation)（The Document Foundation）在博客文章中主张，2007 年引入的基于 XML 的 Office 格式造成供应商锁定，因为在其他程序中打开的文件可能丢失格式或表现不同，而且 ISO 规范的部分内容听凭微软程序在实际中的做法。<sup>[16](https://www.techradar.com/pro/libreoffice-says-microsoft-lock-in-with-office-files-is-hurting-users-around-the-globe)</sup><sup> • </sup><sup>[17](https://www.windowscentral.com/microsoft/microsoft-office/libreoffice-comments-on-microsoft-office-ribbon-ui)</sup>

两大办公格式族仍然彼此独立：ODF（ISO/IEC 26300，由 OASIS 开发）与 OOXML（ISO/IEC 29500）都基于 XML 并以 ZIP 打包，[Microsoft 365](https://www.edgepedia.org/zh/microsoft-365) 应用支持保存和打开 ODF 文件，不过微软指出，使用不受支持功能的用户在保存为 ODF 时可能会看到行为变化或内容丢失。<sup>[2](https://support.microsoft.com/en-us/office/collab-files/learn-about-file-formats)</sup><sup> • </sup><sup>[18](https://www.loc.gov/preservation/digital/formats/fdd/fdd000247.shtml)</sup>

## 安全考量

由于 OOXML 文件是由多种软件处理的 XML 部件的 ZIP 归档，它们是一个既定的攻击面。OWASP 测试指南描述了向 word/document.xml 等内部部件注入带外部实体的 DOCTYPE 并重新打包文件，以测试服务器端文档处理流水线的 XML 外部实体（XXE）注入。<sup>[19](https://github.com/OWASP/www-project-web-security-testing-guide/blob/master/latest/4-Web_Application_Security_Testing/07-Injection/07-XML_Injection.md)</sup> ZIP 容器内的重复文件名是另一个有记录的问题：Apache POI 5.4.0 之前的 CVE-2025-31672 允许特制的 .xlsx、.docx 或 .pptx 文件携带多个同名条目，不同产品会选择不同条目；POI 5.4.0 增加了拒绝此类文件的检查。<sup>[20](https://poi.apache.org/)</sup> 影响新 Open XML 格式本身的第一个漏洞是 CVE-2008-3003，这是一个信息泄露问题，尽管有旨在阻止保存密码的复选框，Excel 连接密码仍被保存到文件中。<sup>[11](https://www.microsoft.com/en-us/msrc/blog/2008/08/ms08-043-how-to-prevent-this-information-disclosure-vulnerability)</sup>

## 维护

ISO/IEC JTC 1/SC 34 第 4 工作组维护 ISO/IEC 29500 系列。尽管自 2018 年 ISO/IEC 30114-2 出版以来没有新项目分配给该组，所有部分的维护仍需要大量专家资源。ISO/IEC 29500-1 与 29500-4 的修订版已进入 DIS 阶段，投票定于 JTC 1 2025 年 11 月全会期间结束；据描述，修订版更短、组织更好，并修复了许多技术缺陷。<sup>[6](https://assets.iec.ch/further_informations/3408/ISO-IEC%20JTC%201_N17594_SC%2034%20Business%20Plan%202025.pdf)</sup> ISO/IEC 29500-1:2016（第 4 版）仍是第 1 部分当前已出版的版本，最近于 2022 年复审并确认。<sup>[7](https://www.iso.org/cms/%20render/live/en/sites/isoorg/contents/data/standard/07/16/71691.html?browse=ics)</sup>

## References

1. [OOXML Format Family -- ISO/IEC 29500 and ECMA 376, Library of Congress Sustainability of Digital Formats](https://www.loc.gov/preservation/digital/formats/fdd/fdd000395.shtml)
2. [Learn about file formats, Microsoft Support](https://support.microsoft.com/en-us/office/collab-files/learn-about-file-formats)
3. [Office Open XML Overview, Ecma International white paper (2008)](https://www.ecma-international.org/wp-content/uploads/OfficeXML-White-Paper-v2008-10-03.pdf)
4. [Open Packaging Conventions (Office Open XML), ISO 29500-2:2008-2012, Library of Congress](https://www.loc.gov/preservation/digital/formats/fdd/fdd000363.shtml)
5. [ECMA-376: Office Open XML file formats, Ecma International](https://ecma-international.org/publications-and-standards/standards/ecma-376/)
6. [ISO/IEC JTC 1 N 17594, SC 34 Business Plan 2025](https://assets.iec.ch/further_informations/3408/ISO-IEC%20JTC%201_N17594_SC%2034%20Business%20Plan%202025.pdf)
7. [ISO/IEC 29500-1:2016, ISO](https://www.iso.org/cms/%20render/live/en/sites/isoorg/contents/data/standard/07/16/71691.html?browse=ics)
8. [Markup Compatibility and Extensibility (Office Open XML), ISO 29500-3, Library of Congress](https://wwws.loc.gov/preservation/digital/formats/fdd/fdd000396.shtml)
9. [File format reference for Word, Excel, and PowerPoint, Microsoft Learn](https://learn.microsoft.com/office/compatibility/office-file-format-reference)
10. [About the Open XML SDK for Office, Microsoft Learn](https://learn.microsoft.com/en-us/office/open-xml/about-the-open-xml-sdk)
11. [MS08-043: How to prevent this information disclosure vulnerability, Microsoft Security Research & Defense (2008)](https://www.microsoft.com/en-us/msrc/blog/2008/08/ms08-043-how-to-prevent-this-information-disclosure-vulnerability)
12. [Word, Excel, and PowerPoint Standards Support, Microsoft Learn](https://learn.microsoft.com/en-us/openspecs/office_standards/ms-offstandlp/d5784a8b-7070-466b-befa-b7bf3724c6f0)
13. [MS-OI29500: Office Implementation Information for ISO/IEC 29500 Standards Support, Microsoft Learn](https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oi29500/)
14. [Apache POI Frequently Asked Questions](https://poi.apache.org/help/faq)
15. [Shah, Rajiv and Kesan, Jay (2008). Evaluating the interoperability of document formats: ODF and OOXML as examples. ICEGOV '08, pp. 219-225.](https://experts.illinois.edu/en/publications/evaluating-the-interoperability-of-document-formats-odf-and-ooxml/)
16. [LibreOffice says Microsoft 'lock-in' with Office files is hurting users around the globe, TechRadar](https://www.techradar.com/pro/libreoffice-says-microsoft-lock-in-with-office-files-is-hurting-users-around-the-globe)
17. [Microsoft Office's "ribbon" user interface is apparently overrated, Windows Central](https://www.windowscentral.com/microsoft/microsoft-office/libreoffice-comments-on-microsoft-office-ribbon-ui)
18. [OpenDocument Format (ODF) Family, OASIS and ISO/IEC 26300, Library of Congress](https://www.loc.gov/preservation/digital/formats/fdd/fdd000247.shtml)
19. [XML Injection, OWASP Web Security Testing Guide](https://github.com/OWASP/www-project-web-security-testing-guide/blob/master/latest/4-Web_Application_Security_Testing/07-Injection/07-XML_Injection.md)
20. [Apache POI, security advisories](https://poi.apache.org/)

---
*Initially written Sep 17, 2026 · Reviewed: Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 软件与编程 › Data formats and serialization › Image and video formats

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/office-open-xml

English original: https://www.edgepedia.org/office-open-xml
