Search code examples
.netexcelopenxmloffice-2010

Where is the XML in this Office Open XML example?


I am looking into the various options of generating Office documents on a server, in particular Excel documents.

The site isn't important but what is relevant is that it used the MS open XML library listed below. I checked out the article on Open Office here:

http://www.codeproject.com/Articles/97307/Using-C-and-Open-XML-SDK-2-0-for-Microsoft-Office

This project seems to set a reference to an openXML library

C:\Program Files\Open XML SDK\V2.0\lib\DocumentFormat.OpenXml.dll 

that is part of the Open XML SDK 2.5 for Microsoft Office.

When I ran the project, the code produced a file that XLSX extension that appeared to be in binary format, not XML format. Similarly, I have seen other Open Office coding examples the file read was a binary format, instead of a file in XML format. For example, when I open up the file in Note, I see "unreadable" characters rather than tags.

Isn't the whole point of Open office XML to read and write XML documents that are in an open format?


Solution

  • Change the file extension to zip and try again.