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. - Populating content in Word files from an XML data source. - Splitting up (shredding) a Word or PowerPoint file into multiple files, and combining multiple Word/PowerPoint files into a single file. - Extraction of data from Excel documents. - Searching and replacing content in Word/PowerPoint using regular expressions. - Updating cached data and embedded spreadsheets for charts in Word/PowerPoint. - Document modification, such as removing tracked revisions or removing unacceptable content from documents.
Get Started
| Product | Versions |
|---|---|
| .NET | |
| .NET Standard | |
| Other |
README
DocumentFormat.OpenXml
The core Open XML SDK library for working with Office Word, Excel, and PowerPoint documents using strongly-typed .NET APIs.
Getting started
Create a simple Word document:
using (var doc = WordprocessingDocument.Create("example.docx", WordprocessingDocumentType.Document))
{
var mainPart = doc.AddMainDocumentPart();
mainPart.Document = new Document(new Body(new Paragraph(new Run(new Text("Hello, Open XML!")))));
}
Documentation and feedback
- Official SDK docs: https://learn.microsoft.com/en-us/office/open-xml/open-xml-sdk
- Source: https://github.com/dotnet/Open-XML-SDK
- Samples: https://github.com/dotnet/Open-XML-SDK/tree/main/samples
- Issues and feature requests: https://github.com/dotnet/Open-XML-SDK/issues
Downloads by Version
Similar & Alternative Packages
Hand-picked matching NuGet libraries based on tags & ecosystem
Depended On By
Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.
Adoption Assessment
Teams that need maximum format control, deterministic output and deep document customization.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.