Open XML SDK 2.0 for Microsoft Office

What is Open XML?

Open XML defines formats for word-processing, spreadsheet and presentation documents in the form of specific markup languages, namely WordprocessingML, SpreadsheetML, and PresentationML.

An Open XML file is stored in a ZIP archive for packaging and compression. You can view the structure of any Open XML file using a ZIP viewer. An Open XML document is built of multiple document parts. The relationships between the parts are themselves stored in document parts. The ZIP format supports random access to each part.

Office 2007 release onwards, Microsoft Word, Excel and PowerPoint applications use Open XML as the default file format.

What is Open XML SDK?

Open XML SDK 2.0 for Microsoft Office provides strongly typed part and content classes to manipulate Open XML documents. It simplifies the task of manipulating Open XML packages and the underlying Open XML schema elements within a package. The SDK supports programming in the style of LINQ to XML which makes coding against the XML content much easier than the traditional W3C XML DOM programming model.

When compared to earlier method of server-side Office automation, the major advantage of using Open XML SDK is that you can create scalable and stable solutions and that the SDK is fully supported on the server.

Click here to Download the SDK 

The Download URL above has installation files for:

  1. Open XML SDK 2.0 for Microsoft Office
  2. Open XML SDK 2.0 Productivity Tool for Microsoft Office

Learning to Program

The How Do I section of the SDK provides how-to topics for working with the Open XML Application Programming Interface (API). There is lot of sample code in C# and VB.NET here you can refer to. I would strongly recommend these code samples as the starting point for developers.

The Open XML Scenarios page has links to articles that present architecture and implementation details for common scenarios in Open XML development.

In case you need help, Office Development Forums are here.

Blog to Read

Blog to read on this subject is the Brian Jones & Zeyad Rajabi: Office Solutions. Some "must read" posts are:

In case you want to leverage combined power of SharePoint 2010 and Office 2010 to build solutions then there is lot of sample code here.

Open XML SDK 2.0 Productivity Tool for Microsoft Office

This tool helps in improving developer productivity and accelerates learning while working with the SDK and Open XML files. It can do following things:

  • Generate Open XML SDK source code based on document content.
  • Compare source and target Open XML documents to highlight the differences.
  • Validate documents. You can validate an entire document, specific document parts or a segment of content against Office 2007 or Office 2010 file formats.
  • Display documentation for the Open XML SDK 2.0, the ISO/IEC 29500 Open XML File Formats standard, and the Microsoft Office implementer notes.