Read and Write Open Document Format (ODF) Spreadsheet (.ods)

Version 1.5.0.0 (6.85 KB) by Paul
Wrappers for the matlab xlsread / xlswrite commands that read ODF Spreadsheet files (.ods).
3K Downloads
Updated 15 Nov 2013

View License

On a pc the wrapper will simply call xlsread / xlswrite, but on a mac or unix platform will read an Open Document Format (ODF) spreadsheet, for example as saved by Open Office.

The wrapper uses java commands from the ODFDOM project which provides java libraries for reading Open Document Format files. The library is not provided here, to download see:

http://incubator.apache.org/odftoolkit/

Once the odfdom.jar file is download it must be added to the javaclasspath (see Matlab documentation on importing java libraries).

This wrapper was developed and tested only on a Mac platform (OSX 10.6.4) with Matlab 2010b using ODFDOM version 0.8.6 (only slight testing with 0.8.7), but should work on other platforms. It could be easily modified to read .ods on a pc or accept variable number of input arguments as xlsread does (currently all xlsread inputs must be specified).

Cite As

Paul (2024). Read and Write Open Document Format (ODF) Spreadsheet (.ods) (https://www.mathworks.com/matlabcentral/fileexchange/28411-read-and-write-open-document-format-odf-spreadsheet-ods), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.5.0.0

Fixed pc infinite loop.

1.4.0.0

Fixed bugs in myxlswrite with row_col_to_cellID and cellID_to_row_col internal functions that map integer row and column numbers to spreadsheet row and column string identifiers.

1.3.0.0

Fixed a bug introduced to xlsread with header option, added document close calls to end of xlsread and xlswrite, this most likely was the source of a "memory leak" problem for read.

1.2.0.0

The package has finally been updated with myxlswrite for writing .ods files. Also myxlsread now defaults to the same behavior as xlsread which ignores column and row headers in the numeric output (bug pointed out by Alex in comments, thanks).

1.0.0.0