1. josemaria.alkala
  2. odt2org


Clone wiki

odt2org / Home


Welcome to the wiki for the project "odt2org". As you can guess by the name of the project, the purpose of this software is to convert from Open Office files (.odt) into emacs org-mode files (.org). Since OpenOffice is able to import files created with Word, there is no need for a "doc2org" converter.


You can download different versions from here.



1. Install python: I have been using python 2.6.x 2. Install lxml. 3. Install OleFileIO.

If you use linux, you probably already know how to install python libraries. The idea is:

  • Unzip/Untar the library
  • Go to the directory where there is a file called: setup.py
  • Install it by mean of a line similar to:
C:\python26\python setup.py install


Very similar to windows way. (Sorry for being lazy)


It is very easy to convert files:

  • Produce "filename.org":
python odt2org.py filename.odt
  • Produces "outputfile.org":
python odt2org.py filename.odt outputfile.org
  • Forces the overwritting of "outputfile.org" if it already exists:
python odt2org.py -f filename.odt outputfile.org
  • Please, don't touch my... spaces/tabs:
python odt2org.py --original filename.odt outputfile.org

You may wish to adjust the paths to your taste:

  • Windows:
C:\python26\python.exe C:\odt2org\odt2org.py C:\MyDocs\tests\filaname.odt C:\myOutputs\filename.org
  • Linux:
/usr/bin/python /home/user/src/odt2org.py ~/testfile.odt /tmp/output.org


  • It uses the level information to create the outline structure. So be sure you use styles when creating your document.
  • It converts simple tables to org-mode tables. It uses first line as a header always.
  • It extracts files such: images, .pdf, .doc, .xls that may be attached as objects. The files are extracted to the same directory where the output file is created. A link is created to those files.
  • It removes extra spaces/tabs from the paragraphs (this behaviour can be overriden).


Note that despite this is not a doc2org converter (that was the original purpose). You can use OpenOffice to convert from .doc to .odt and afterwards this scripts to convert from .odt to .doc:

  • OpenOffice: convert from .doc to .odt
  • odt2org: covert from .odt to .doc


I am not a developer, so don't expect for granted the same level of quality that you can get in other softwares out there. Backup your data. Use at your own risk.

Contact the author

You can contact me via this link.


  • Nov'10: major review of the code. Moved to bitbucket. Licensed as Apache License 2.0.
  • 2010-04-19: a bug in the paths corrected. Now, by default, it replaces many spaces/tabs by just one space in paragraphs.
  • 2010-04-18: some refactoring of the code. Corrections done when dealing with enumerations.
  • 2010-04-17: corrected a bug where the original file was being overwriten. Command line improved.
  • 2009-08-12: first version with main functionality.

About this wiki

This wiki can be managed offline by mean of doing:

$ hg clone http://bitbucket.org/josemaria.alkala/odt2org/wiki

Check the vast library of Pygment lexers for more details.