Giter Club home page Giter Club logo

open-xml-sdk's Introduction

Open XML SDK

NOTICE:

The next minor release (v2.20.0) will be limited in scope and focused on obsoleting types that will be removed in v3.0.0. This should provide a stepping stone for migrating to v3.0.0. This will occur in the release/v2.20.0 branch.

v3.0.0 will refactor a number of things to address some technical debt, with the goal being to retain (as much as possible) source compatibility. This means, we hope to maintain things such that you can update your package and recompile with limited changes. However, binary compatibility will not be a goal and will break that for some changes. However, we plan on keeping these documented. PRs that introduce such changes will be marked with a breaking-change label and will be added to a list to help migrating to v3.0.0. These changes will occur on the main branch.

Please see the v3.0.0 milestone for issues and PRs that are included in this change. For discussions about this change, please join us at this issue.

Downloads Build Status Backend Status

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
DocumentFormat.OpenXml NuGet
DocumentFormat.OpenXml.Linq NuGet
DocumentFormat.OpenXml.Features NuGet

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://openxmlsdk.blob.core.windows.net/feed/index.json" />
  </packageSources>
</configuration>

For latests changes, please see the changelog

Framework Support

The package currently supports the following frameworks:

  • .NET Framework 3.5+
  • .NET Standard 1.3+
  • .NET Core 1.0+
  • .NET 5+
  • Mono 4.6+
  • Xamarin.iOS 10.0+
  • Xamarin.Mac 3.0+
  • Xamarin.Android 7.0+
  • UWP 10.0+
  • Unity 2018.1+

For details on platform support, please see the docs at https://docs.microsoft.com/en-us/dotnet/standard/net-standard.

Known Issues

  • On .NET Core and .NET 5, 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 Core, targeting .NET Framework 4.5+, and .NET 5, System.Uri will not parse invalid links. This causes an exception. A workaround in v2.12.0+ of OpenXml SDK is to use OpenSettings.RelationshipErrorRewriter to rewrite them to something that can be parsed. A discussion is available here to enable something more robust in System.IO.Packaging.
  • 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

The functionality of the specific classes in this version of the Open XML SDK is similar to version 2.5, therefore the Open XML SDK 2.5 for Office documentation available on MSDN is still accurate.

In addition to open sourcing of the SDK, Microsoft has opened up the conceptual documentation for public review / contributions. A copy of the documentation is available for you to edit and review in GitHub.

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.
  • 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) [email protected]. 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.

open-xml-sdk's People

Contributors

twsouthwick avatar tomjebo avatar ericwhitedev avatar thomasbarnekow avatar mikeebowen avatar josh-curry avatar lindexi avatar alfredhellstern avatar numpsy avatar o365devx avatar lklein53 avatar officecpub avatar andrewdavidoff avatar davidchesnut avatar will-gregg avatar weswigham avatar sorensenmatias avatar nokafor avatar stoiveyp avatar rmboggs avatar f1nzer avatar igitur avatar vitaliypavlyukov avatar jthake avatar aidilumarov avatar stevehansen avatar hotspurhn avatar rstm-sf avatar robertmuehsig avatar przemyslawklys avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.