Editing IO package

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 29: Line 29:
</nowiki></pre>
</nowiki></pre>


Be aware that writing to worksheets using the OCT interface wipes all formatting.


==== xlswrite / odswrite versus xlsopen / odsopen ..... xlsclose / odsclose ====
==== xlswrite / odswrite versus xlsopen / odsopen ..... xlsclose / odsclose ====
Line 56: Line 55:
* .xls - is an outdated default binary file format from <= Office 2003 - '''try to avoid this format!'''
* .xls - is an outdated default binary file format from <= Office 2003 - '''try to avoid this format!'''
* .xlsx - is the new default file format since Office 2007. [https://en.wikipedia.org/wiki/OOXML It consists of xml files stored in a .zip container.] - '''always save in or convert to this format!'''
* .xlsx - is the new default file format since Office 2007. [https://en.wikipedia.org/wiki/OOXML It consists of xml files stored in a .zip container.] - '''always save in or convert to this format!'''
* The ''(new)'' OCT interface can read ''(since version 1.2.5)'' and write ''(since version 2.2.0)'' .xlsx files dependency-free! No need of MS Windows+Office nor Java, with one caveat: when writing it doesn't retain formatting. For that you still need one of the other interfaces.
* The ''(new)'' OCT interface can read ''(since version 1.2.5)'' and write ''(since version 2.2.0)'' .xlsx files dependency-free! No need of MS Windows+Office nor Java.
* Windows is notorious for hiding "known" file extensions. However in Windows Explorer it is easy to change this and have Windows show all file extensions.
* Windows is notorious for hiding "known" file extensions. However in Windows Explorer it is easy to change this and have Windows show all file extensions.


==== different interfaces ====
==== different interfaces ====
Line 422: Line 422:
* for OOXML support (only available with Apache POI): '''poi-ooxml-schemas-<version>.jar''', '''xbean.jar''' or '''xmlbeans.jar''', '''dom4j-1.6.1.jar''' in javaclasspath.
* for OOXML support (only available with Apache POI): '''poi-ooxml-schemas-<version>.jar''', '''xbean.jar''' or '''xmlbeans.jar''', '''dom4j-1.6.1.jar''' in javaclasspath.
** Get them here: http://poi.apache.org/download.html ("xmlbeans" and poi-ooxml-schemas) or http://sourceforge.net/projects/dom4j/files (dom4j-<version>)
** Get them here: http://poi.apache.org/download.html ("xmlbeans" and poi-ooxml-schemas) or http://sourceforge.net/projects/dom4j/files (dom4j-<version>)
* For POI-4.x.x additional .jar files are needed: commons-collection4-4.x.jar, xml-apis.jar
A note on Apache POI:
This used to be the most reliable and reasonably fast spreadsheet I/O interface SW. But sadly, each major Apache POI release turns out to have become much more complicated in the sense of finding out which .jar files (Java libraries) are needed for Octave. As of Apache 5.x.x, I (= IO package maintainer) have given up on hunting this down. AFAICS for 5.x.x commons-io, log4j-api and maybe others are also required.


JExcelAPI specific:
JExcelAPI specific:
Please note that all contributions to Octave may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see Octave:Copyrights for details). Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Template used on this page: