Thursday, September 3, 2009

Converting ODS to CSV

Recently I've released an ODS (OpenDocument Spreadsheet) to CSV (Comma-Separated Values) converter. It's available from GitHub:
The current version (0.1) is not perfect, I've documented some issues, mainly related to empty fields/records being output. After releasing version 0.1 I created some unit tests; once they pass, these issues should be resolved.

During development, it turned out it's really easy to parse an ODS file, since it's just a ZIP file with the contents contained in simple XML file inside it.

The converter uses SAX to parse the XML inside it, to minimize memory usage. It comes with a Java library, a command line program and an Apache Ant task. And there are no external dependencies other than a Java runtime environment (version 1.5 or up).

3 comments:

  1. how to convert .ods file to .csv in java

    i try to convert ods file to csv but its jar file is not available

    ReplyDelete
  2. I think Aspose.Cells for Java Library can help you in this try and you can ask for their help on their forum also, Their support team is very helpful.

    http://www.aspose.com/community/forums/aspose.cells-product-family/19/showforum.aspx

    ReplyDelete
  3. Meredith: Thanks for the hint!

    ReplyDelete