Office Open XML vs COM automation

Looking at the new Open XML API, introduced by Kevin Boske here, makes you realise that old-style COM automation wasn’t so bad after all.

There are two distinct aspects to working programmatically with OOXML. First, there’s the Packaging API, which deals with how the various XML files which make up a document get stored in a ZIP archive. Second, there’s the XML specification itself, which defines the schema of elements and attributes that form the content of an OOXML document.

The new wrapper classes really only deal with the packaging aspect. You still have to work out how to parse and/or generate the correct XML content using your favourite XML parser. And it’s a lot more complex then HTML.

By contrast, the old COM automation API for Office presents a programmatic object model for the content, and you don’t have to worry much about how the document gets stored – you just tell Word or Excel to save it.

The (very big) downside of the COM object model is that it depends on the presence of Microsoft Office. High resource requirements, version problems, Windows-only, and inappropriate for server apps.

We seem to have traded one problem for another. What Microsoft needs to provide is wrapper classes for the content, rather than just its packaging.

Technorati tags: , , , ,
VN:F [1.8.1_1037]
Rate this post
Rating: 0.0/10 (0 votes cast)

Related posts:

  1. Office Open XML needs wrapper classes
  2. Why Open Office does not import/export Microsoft Office Open XML
  3. Open Document to Office Open XML converter: not good
  4. Open Office chokes on Open XML spec
  5. Microsoft’s Jean Paoli on Office Open XML

2 comments to Office Open XML vs COM automation

  • Both Microsoft and an open source Java team are working on wrappers called Microsoft SDK for Open XML Formats and OpenXML4J respectively.

  • Tim

    Jonathan,

    Well, the library I linked to is called Microsoft SDK for Open XML Formats, but it deals mainly with packaging not content.

    It looks like OpenXML4J is the same, judging by this FAQ item:

    Can I work at document level now ? (Open Packaging Convention is considered as structure level)
    Unfortunately not yet, but we are working hard for it !

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>