Click here to Skip to main content
14,934,882 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi All,

I want to create a basic application that browses a excel document and converts its contents into a xml format, any help would be helpful.

Maciej Los 19-Feb-13 15:00pm
Please, provide more details. Did you know that Excel 2007 - 2010 files are based on xml files? See this:
Sergey Alexandrovich Kryukov 19-Feb-13 15:17pm
From my answer, it should be clear that the format is already XML, zipped — please see.
Maciej Los 19-Feb-13 15:25pm
I knew it, Sergey. I was first with my comment, than you with your answer ;)
Sergey Alexandrovich Kryukov 19-Feb-13 15:34pm
But you did not answer on the file formats. :-)
Maciej Los 19-Feb-13 15:40pm
Yes, that's because i'm not sure what OP wants to ask.
Sergey Alexandrovich Kryukov 19-Feb-13 15:49pm
Well, I'm not even sure OP understands what she/he wants...
Maciej Los 19-Feb-13 16:34pm
Agree ;)

There is no such thing as just "XML format". XML is a kind of a media for many formats. This way, the question does not have a full sense. I just want to bring to your attention that an .XLSX Excel document is already XML; you only need to unpack the file, which is actually is a ZIP format. You can learn about the format here:[^],[^].

What you are going to do with that is your business. From your question, I'm not sure you really know what.


For working with ZIP, you can use #ziplib:[^].

Another option is using SevenZipSharp, a .NET wrapper of the famous 7-Zip:[^],[^].

Both ZIP libraries are open-source.

Good luck,
Maciej Los 19-Feb-13 16:34pm
What about Excel 1997-2003, XP file formats?
Sergey Alexandrovich Kryukov 19-Feb-13 16:58pm
If anyone needs that, it's solvable. The source code of LibreOffice and OpenOffice is available; they can use those files. The code can be written in C# or wrapped using P/Invoke or C++/CLI. That's the solution.
Maciej Los 19-Feb-13 17:01pm
The answer is complete now ;)
Sergey Alexandrovich Kryukov 19-Feb-13 17:07pm
Thank you very much, Maciej.
Another very funny answer is almost ready, take a look...
Sergey Alexandrovich Kryukov 19-Feb-13 17:17pm
And to make it more complete, I added the advice on how to work with ZIP (mostly because another question was about JAR, which is also ZIP :-).
See whether his article can help
Generate Excel from XML and Generate XML from Excel[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900