DocumentFormat.OpenXml 3.1.1
Open XML SDK
[!NOTE]
v3.0.0 refactors and addresses some technical debt while retaining source compatibility as much as possible. You should be able to update your package and recompile with limited changes. However, binary compatibility was not a goal and will break that for some changes which are documented. PRs that introduced such changes are marked with a
breaking-change
label and were added to a list to help migrating to v3.0.0.Please see the v3.0.0 milestone for issues and PRs that are included. For discussions, please join us at this issue.
[!IMPORTANT] The CI feed URL has changed as of 2 April, 2024. Please update to the new URL if using CI builds.
The Open XML SDK provides tools for working with Office Word, Excel, and PowerPoint documents. It supports scenarios such as:
- High-performance generation of word-processing documents, spreadsheets, and presentations.
- Document modification, such as adding, updating, and removing content and metadata.
- Search and replace content using regular expressions.
- Splitting up (shredding) a file into multiple files, and combining multiple files into a single file.
- Updating cached data and embedded spreadsheets for charts in Word/PowerPoint.
Table of Contents
Packages
The official release NuGet packages for Open XML SDK are on NuGet.org:
Package | Download | Prerelease |
---|---|---|
DocumentFormat.OpenXml.Framework | ||
DocumentFormat.OpenXml | ||
DocumentFormat.OpenXml.Linq | ||
DocumentFormat.OpenXml.Features |
Daily Builds
The NuGet package for the latest builds of the Open XML SDK is available as a custom feed on an Azure blob. Stable releases here will be mirrored onto NuGet and will be identical. You must set up a NuGet.config file that looks similar to this:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="OpenXmlCI" value="https://ooxml.blob.core.windows.net/feed/index.json" />
</packageSources>
</configuration>
For latests changes, please see the changelog
Framework Support
The package currently supports the following targets:
- .NET Framework 3.5, 4.0, 4.6
- .NET Standard 2.0
- .NET 6.0
For details on platform support, including other runtimes such as Mono and Unity, please see the docs at https://docs.microsoft.com/en-us/dotnet/standard/net-standard.
Known Issues
- On .NET Core and .NET 5 and following, ZIP packages do not have a way to stream data. Thus, the working set can explode in certain situations. This is a known issue.
- On .NET Framework, an
IsolatedStorageException
may be thrown under certain circumstances. This generally occurs when manipulating a large document in an environment with an AppDomain that does not have enough evidence. A sample with a workaround is available here.
Documentation
Please see Open XML SDK for the official documentation.
If you have how-to questions
- Stack Overflow (tags: openxml or openxml-sdk)
- How-to samples:
Related tools
- Open XML SDK 2.5 Productivity Tool: The Productivity Tool provides viewing and code generation compatible with the Open XML SDK 2.5.
- Open XML Powertools: This provides example code and guidance for implementing a wide range of Open XML scenarios.
- ClosedXml: This library provides a simplified object model on top of the OpenXml SDK for manipulating and creating Excel documents.
- OfficeIMO: This library provides a simplified object model on top of the OpenXml SDK manipulating and creating Word documents.
- OpenXML-Office: This nuget library provides a simplified object model on top of the OpenXml SDK manipulating and creating PPT and Excel documents.
- Serialize.OpenXml.CodeGen: This is a tool that converts an OpenXml document into the .NET code required to create it.
- Html2OpenXml: This is a tool that takes HTML and converts it to an OpenXml document.
- DocxToSource: This is a tool designed to be a replacement for the old OpenXML SDK Productivity Tool.
- OOXML Viewer: This is an extension for Visual Studio Code to View and Edit the xml parts of an Office Open XML file and to view a diff with the previous version of an OOXML part when saved from an outside program. Search "OOXML" in the VS Code extensions tab or download it from the VS Code Marketplace
- ShapeCrawler: This library provides a simplified object model on top of the OpenXml SDK to manipulate PowerPoint documents.
- OOXML Validator: VS Code extension to validate Office Open XML files. Search "OOXML" in the VS Code extensions tab or download it from the VS Code Marketplace
How can I contribute?
We welcome contributions! Many people all over the world have helped make this project better.
- Contributing explains what kinds of contributions we welcome
Reporting security issues and security bugs
Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.
.NET Foundation
The Open XML SDK is a .NET Foundation project.
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information, see the .NET Foundation Code of Conduct.
License
The Open XML SDK is licensed under the MIT license.
Showing the top 20 packages that depend on DocumentFormat.OpenXml.
Packages | Downloads |
---|---|
ClosedXML
ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It aims to provide an intuitive and user-friendly interface to dealing with the underlying OpenXML API.
|
7 |
ClosedXML
ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It aims to provide an intuitive and user-friendly interface to dealing with the underlying OpenXML API.
|
8 |
ClosedXML
ClosedXML makes it easier for developers to create Excel 2007/2010/2013 files. It provides a nice object oriented way to manipulate the files (similar to VBA) without dealing with the hassles of XML Documents. It can be used by any .NET language like C# and Visual Basic (VB).
|
7 |
ClosedXML
ClosedXML makes it easier for developers to create Excel 2007/2010 files. It provides a nice object oriented way to manipulate the files (similar to VBA) without dealing with the hassles of XML Docume
|
6 |
ClosedXML
ClosedXML makes it easier for developers to create Excel 2007/2010 files. It provides a nice object oriented way to manipulate the files (similar to VBA) without dealing with the hassles of XML Docume
|
7 |
ClosedXML
ClosedXML makes it easier for developers to create Excel 2007+ (.xlsx, .xlsm, etc) files. It provides a nice object oriented way to manipulate the files (similar to VBA) without dealing with the hassles of XML Documents. It can be used by any .NET language like C# and VisualBasic.NET.
|
6 |
ClosedXML
ClosedXML makes it easier for developers to create Excel 2007+ (.xlsx, .xlsm, etc) files. It provides a nice object oriented way to manipulate the files (similar to VBA) without dealing with the hassles of XML Documents. It can be used by any .NET language like C# and VisualBasic.NET.
|
7 |
ClosedXML
ClosedXML makes it easier for developers to create Excel 2007+ (.xlsx, .xlsm, etc) files. It provides a nice object oriented way to manipulate the files (similar to VBA) without dealing with the hassles of XML Documents. It can be used by any .NET language like C# and Visual Basic (VB).
|
6 |
ClosedXML
See release notes https://github.com/ClosedXML/ClosedXML/releases/tag/0.102.0-rc ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It aims to provide an intuitive and user-friendly interface to dealing with the underlying OpenXML API.
|
6 |
ClosedXML
See release notes https://github.com/ClosedXML/ClosedXML/releases/tag/0.103.0-beta ClosedXML is a .NET library for reading, manipulating and writing Excel 2007+ (.xlsx, .xlsm) files. It aims to provide an intuitive and user-friendly interface to dealing with the underlying OpenXML API.
|
7 |
MiniWord
.NET Word(docx) exporting template engine without COM+ and interop (support Linux and Mac)
|
6 |
MiniWord
.NET Word(docx) exporting template engine without COM+ and interop (support Linux and Mac)
|
7 |
OpenXmlPowerTools
PowerTools for Open XML (NuGet package) contains binaries for accomplishing various common tasks using the Open XML SDK, such as:
High-fidelity conversion of DOCX to HTML/CSS using HtmlConverter.cs
Merging and splitting DOCX documents using DocumentBuilder.cs
Merging and splitting PPTX presentations using PresentationBuilder.cs
Accepting tracked revisions in DOCX documents using RevisionAccepter.cs
Searching and replacing text in DOCX documents using TextReplacer.cs
|
6 |
OpenXmlPowerTools
PowerTools for Open XML (NuGet package) contains binaries for accomplishing various common tasks using the Open XML SDK, such as:
High-fidelity conversion of DOCX to HTML/CSS using HtmlConverter.cs
Merging and splitting DOCX documents using DocumentBuilder.cs
Merging and splitting PPTX presentations using PresentationBuilder.cs
Accepting tracked revisions in DOCX documents using RevisionAccepter.cs
Searching and replacing text in DOCX documents using TextReplacer.cs
|
7 |
OpenXmlPowerTools
The Open XML PowerTools provides guidance and example code for programming with Open XML Documents (DOCX, XLSX, and PPTX). It is based on, and extends the functionality of the Open XML SDK.
It supports scenarios such as:
•Splitting DOCX/PPTX files into multiple files.
•Combining multiple DOCX/PPTX files into a single file.
•Populating content in template DOCX files with data from XML.
•High-fidelity conversion of DOCX to HTML.
•Searching and replacing content in DOCX/PPTX using regular expressions.
•Managing tracked-revisions, including detecting tracked revisions, and accepting tracked revisions.
•Updating Charts in DOCX/PPTX files, including updating cached data, as well as the embedded XLSX.
•Retrieving metrics from DOCX files, including the hierarchy of styles used, the languages used, and the fonts used.
•Writing XLSX files using far simpler code than directly writing the markup, including a streaming approach that enables writing XLSX files with millions of rows.
|
8 |
.NET Framework 3.5
- DocumentFormat.OpenXml.Framework (>= 3.1.1)
.NET Framework 4.0
- DocumentFormat.OpenXml.Framework (>= 3.1.1)
.NET Framework 4.6
- DocumentFormat.OpenXml.Framework (>= 3.1.1)
.NET 8.0
- DocumentFormat.OpenXml.Framework (>= 3.1.1)
.NET Standard 2.0
- DocumentFormat.OpenXml.Framework (>= 3.1.1)
Version | Downloads | Last updated |
---|---|---|
3.1.1 | 2 | 11/05/2024 |
3.1.0 | 0 | 07/30/2024 |
3.0.2 | 10 | 05/09/2024 |
3.0.1 | 4 | 05/14/2024 |
3.0.0 | 8 | 05/09/2024 |
3.0.0-beta0003 | 0 | 09/05/2023 |
3.0.0-beta0002 | 6 | 05/21/2024 |
2.20.0 | 3 | 06/01/2024 |
2.19.0 | 7 | 12/10/2023 |
2.18.0 | 5 | 12/10/2023 |
2.17.1 | 3 | 06/01/2024 |
2.16.0 | 4 | 06/01/2024 |
2.15.0 | 6 | 06/01/2024 |
2.14.0 | 7 | 05/09/2024 |
2.14.0-beta0001 | 3 | 06/01/2024 |
2.13.1 | 6 | 05/09/2024 |
2.13.0 | 4 | 06/01/2024 |
2.13.0-beta0002 | 3 | 06/01/2024 |
2.13.0-beta0001 | 6 | 05/21/2024 |
2.12.3 | 2 | 05/21/2024 |
2.12.2 | 1 | 11/09/2024 |
2.12.1 | 6 | 06/01/2024 |
2.12.0 | 6 | 05/12/2024 |
2.11.3 | 7 | 05/21/2024 |
2.11.2 | 6 | 06/01/2024 |
2.11.1 | 4 | 06/01/2024 |
2.11.0 | 4 | 06/01/2024 |
2.11.0-beta0001 | 5 | 06/01/2024 |
2.10.1 | 5 | 05/19/2024 |
2.10.0 | 3 | 05/09/2024 |
2.10.0-beta0002 | 4 | 05/29/2024 |
2.10.0-beta0001 | 4 | 06/01/2024 |
2.9.1 | 5 | 05/09/2024 |
2.9.0 | 4 | 05/09/2024 |
2.8.1 | 3 | 05/18/2024 |
2.8.0 | 4 | 05/19/2024 |
2.7.2 | 6 | 05/21/2024 |
2.7.1 | 5 | 05/09/2024 |
2.5.0 | 4 | 05/09/2024 |
1.0.0 | 3 | 05/29/2024 |