The OpenDocument web site is not longer accepting new posts. Information on this page is preserved for legacy purposes only. For current information on ODF, please see the OASIS OpenDocument Technical Committee.

Creating ODF file through C++/C

Hi guys

I need to convert word file to odf format i could able to read word file .

i wanted to create ODf format for word file in c++ that will run in both linu/windows.



You could use the components, using the API to read and convert documents without starting up the OOo in GUI mode. 

KOffice 2 will also run on Windows as well, so that's another office suite that can be scripted.

On a related note, the Qt 4.5 toolkit has a document writer for ODF:


I can't comment to the ODF side of the process, but, if you are working from a Word *.DOCX file (Open XML) then there are a bunch of articles on working with this format from a number of languages at

 Another option (but Windows only) would be to use Word automation to automate the opening of the document in Microsoft word and then saving it as an Open Document Format document.
A few caveats. 1. This approach is not suitable for use on a server- word automation doesn't scale that well. 2. It's Windows only. 3. Open Document Format is not able to express all of the  characteristics of an Open XML document.

That said, the second approach from above would certainly be the easiest to achieve.




Thanks for valuable information.

as far second option is concerned that cannot be used since i need to run in both enviroment (linux/windows) .and product must support ms office 97 to 2007.


Other projects that might be helpful

 (while they are written in java or python, they might give you an idea on how to do it in c/c++) Focus Areas: BPEL | DITA | ebXML | IDtrust | OpenDocument | SAML | UBL | UDDI
OASIS sites: OASIS | Cover Pages | | AMQP | CGM Open | eGov | Emergency | IDtrust | LegalXML | Open CSA | OSLC | WS-I