BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News A New Library and Tooling Package for Open XML

A New Library and Tooling Package for Open XML

This item in japanese

Office Open XML is an internationally recognized standard for documents that is based on an ZIP/XML representation of various Microsoft Office file formats. It competes with the Open Document Format (ODF), another internationally recognized standard format based on the native format for Open Office files. While it is possible to manipulate Open XML files using low level APIs, the complexity of the format makes that a daunting challenge.

The first generation of the Open XML SDK provided a thin layer on top of the raw XML. While better than nothing, it still required an intimate knowledge of the underlying format. As such it wasn’t of much interest and most developers continued using the Office COM APIs. Unfortunately the COM libraries are very problematic. They require the associated Office products to be installed and cannot be safely used from servers such as IIS. Even when accessed via standalone programs, developers need to take extreme to avoid leaking instances of Word or Excel.

Open XML SDK 2.0 offers a higher level API for manipulating Open XML documents. Unlike the previous version there are specific APIs for each type of document. A deep understanding of the underlying file format is still required, but it is a stepping stone.

Also included in this release is the Open XML SDK v2.0 Productivity Tool. The primary purpose of this tool is to reverse engineer a Word, PowerPoint, or Excel document. It will then generate C# code that can recreate the document. This tool can also be used to validate documents.

Rate this Article

Adoption
Style

BT