From: <prn...@us...> - 2010-01-18 20:57:00
|
Revision: 6787 http://octave.svn.sourceforge.net/octave/?rev=6787&view=rev Author: prnienhuis Date: 2010-01-18 20:56:49 +0000 (Mon, 18 Jan 2010) Log Message: ----------- Fixedlay-out; added a paragraph on java memory usage and memory options. Modified Paths: -------------- trunk/octave-forge/main/io/doc/READ-ODS.html trunk/octave-forge/main/io/doc/READ-XLS.html Modified: trunk/octave-forge/main/io/doc/READ-ODS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-ODS.html 2010-01-18 12:14:21 UTC (rev 6786) +++ trunk/octave-forge/main/io/doc/READ-ODS.html 2010-01-18 20:56:49 UTC (rev 6787) @@ -7,7 +7,7 @@ <META NAME="AUTHOR" CONTENT="Philip Nienhuis"> <META NAME="CREATED" CONTENT="20091229;22213000"> <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGED" CONTENT="20100117;20543700"> + <META NAME="CHANGED" CONTENT="20100118;21551300"> <META NAME="Info 1" CONTENT=""> <META NAME="Info 2" CONTENT=""> <META NAME="Info 3" CONTENT=""> @@ -15,6 +15,7 @@ <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> + <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> <STYLE TYPE="text/css"> <!-- @page { margin: 0.79in } @@ -33,7 +34,7 @@ <P ALIGN=CENTER STYLE="margin-bottom: 0in"><BR> </P> <P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2>This -version January 14, 2010</FONT></FONT></P> +version January 18, 2010</FONT></FONT></P> <P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> </P> <P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I>(ODS @@ -127,7 +128,8 @@ <P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> </P> <P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">For -ODS access, you'll need one of the following java class files</FONT></FONT></P> +ODS access, you'll need to choose at least one of the following java +class files collections:</FONT></FONT></P> <UL> <LI><P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">(currently the preferred option) <B>odfdom.jar</B> & <B>xercesImpl.jar</B>. @@ -234,9 +236,12 @@ </P> <P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">I -know of one big gotcha: i.e. reading dates (& time).</FONT></FONT></P> +know of one big gotcha: i.e. reading dates (& time). A less +obvious one is java memory pool allocation size.</FONT></FONT></P> <P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> </P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>Date +and time in ODS</B></FONT></FONT></P> <P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Octave (as does Matlab) stores dates as a number representing the number of @@ -278,7 +283,54 @@ floats in octave cell arrays.</FONT></FONT></P> <P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> </P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>Java +memory pool allocation size</B></FONT></FONT></P> <P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">The +java virtual machine (JVM) initializes one big chunk of your +computer's RAM in which all java classes and methods etc. are to be +loaded: the java memory pool. It does this because java has a very +sophisticated “garbage collection” system. At least on +Windows, the initial size is 2MB and the maximum size is 64MB. On +Linux this allocated size is much bigger. This part of memory is +where the java-based ODS octave routines (and the java-based xls +routines) live and keep their variables etc.</FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">For +transferring large pieces of information to and from spreadsheets you +might hit the limits of this pool. E.g. to be able to handle I/O of +an array of around 50,000 cells I needed a memory pool size of 512 +MB.</FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">The +memory size can be increased by inserting a file called “java.opts” +(without quotes) in the directory +./share/octave/packages/java-<version> (where the script file +javaclasspath.m is located), containing just the following lines:</FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; text-decoration: none"><FONT FACE="Courier New, monospace"><FONT SIZE=2 STYLE="font-size: 11pt"><B>-Xms16m</B></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; text-decoration: none"><FONT FACE="Courier New, monospace"><FONT SIZE=2 STYLE="font-size: 11pt"><B>-Xmx512m</B></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">(where +16 = initial size, 512 = maximum size, m stands for Megabyte).</FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">After +processing a large chunk of spreadsheet information you might notice +that octave's memory footprint does not shrink so it looks like +java's memory pool does not shrink back; but rest assured, the memory +footprint is the <I>allocated</I><SPAN STYLE="font-style: normal"> +(reserved) memory size, not the actual used size. After the JVM has +done its garbage collection, only the so-called “working set” +of the memory allocation is really in use and that is a trimmed-down +part of the memory allocation pool. On Windows systems it often +suffices to minimize the octave terminal for a few seconds to get a +more reasonable memory footprint.</SPAN></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<BR> +</P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<BR> +</P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Smaller gotcha's (only with jOpenDocument):</FONT></FONT></P> <UL> @@ -380,7 +432,9 @@ and easy ODS write support (maybe when jOpenDocument is more mature)</FONT></FONT></P> <LI><P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Speeding - up</FONT></FONT></P> + up (ODS is 10 X slower than e.g. OOXML !!!). jOpenDocument is + muchfasterbut </FONT></FONT> + </P> <LI><P ALIGN=LEFT STYLE="margin-bottom: 0in; text-decoration: none">“<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-weight: normal">Passing function handle” a la Matlab's xlsread.</SPAN></FONT></FONT></P> </UL> @@ -388,5 +442,11 @@ </P> <P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Enjoy!</FONT></FONT></P> +<P STYLE="margin-left: 0.26in; text-indent: -0.26in; margin-bottom: 0in"> +<BR> +</P> +<P ALIGN=CENTER STYLE="margin-left: 0.26in; text-indent: -0.26in; margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Philip +Nienhuis, Jan 18, 2010</FONT></FONT></P> </BODY> </HTML> \ No newline at end of file Modified: trunk/octave-forge/main/io/doc/READ-XLS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-XLS.html 2010-01-18 12:14:21 UTC (rev 6786) +++ trunk/octave-forge/main/io/doc/READ-XLS.html 2010-01-18 20:56:49 UTC (rev 6787) @@ -7,7 +7,7 @@ <META NAME="AUTHOR" CONTENT="Philip Nienhuis"> <META NAME="CREATED" CONTENT="20091211;17230700"> <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGED" CONTENT="20100112;22050800"> + <META NAME="CHANGED" CONTENT="20100118;21550000"> <META NAME="Info 1" CONTENT=""> <META NAME="Info 2" CONTENT=""> <META NAME="Info 3" CONTENT=""> @@ -18,6 +18,7 @@ <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> + <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> <STYLE TYPE="text/css"> <!-- @page { margin: 0.79in } @@ -27,116 +28,128 @@ </STYLE> </HEAD> <BODY LANG="en-US" DIR="LTR"> -<P ALIGN=CENTER STYLE="margin-bottom: 0in">README for Excel -spreadsheet file r/w access scripts for octave (> +<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">README +for Excel spreadsheet file r/w access scripts for octave (> 3.2.0)<BR><BR>Copyright (C) 2009, Philip Nienhuis <prnienhuis at -users.sf.net><BR><BR>This version 12 January 2010.</P> +users.sf.net><BR><BR>This version 18 January 2010.</FONT></FONT></P> <P ALIGN=CENTER STYLE="margin-bottom: 0in"><BR> </P> <P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> </P> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>EXCEL -.XLS SUPPORT FILES</B></U></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR><B>doc/README-XLS.html</B></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in">This file.</P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR><B>xlsread.m</B></P> -<P STYLE="margin-bottom: 0in">All-in-one function for reading data -from one specific worksheet in an Excel spreadsheet file. This script -has Matlab-compatible functionality.<BR><BR><B>xlswrite.m</B></P> -<P STYLE="margin-bottom: 0in">All-in-one function for writing data to -one specific worksheet in an Excel spreadsheet file. This script has -Matlab-compatible functionality. <BR><BR><B>xlsfinfo.m</B></P> -<P STYLE="margin-bottom: 0in">All-in-one function for exploring basic -properties of an Excel spreadsheet file. This script has -Matlab-compatible functionality.<BR><BR><B>xlsopen.m</B></P> -<P STYLE="margin-bottom: 0in">Function for "opening" (= -providing a handle to) an Excel spreadsheet file ("workbook"). -This function sorts out which interface to use for .xls access -(i.e.,COM; Java & Apache POI; JexcelAPI; etc.), but it's choice -can be overridden.<BR><BR><B>xls2oct.m</B></P> -<P STYLE="margin-bottom: 0in">Function for reading data from a -specific worksheet pointed to in a struct created by xlsopen.m. -xls2oct can be called multiple times consecutively using the same -pointer struct, each time allowing to read data from different ranges -and/or worksheets. Data are returned in the form of a 2D -heterogeneous cell array that can be parsed by parsecell.m. xls2oct -is a mere wrapper for interface-dependent scripts that do the actual -low-level reading .<BR><BR><B>oct2xls.m</B></P> -<P STYLE="margin-bottom: 0in">Function for writing data to a specific -worksheet pointed to in a struct created by xlsopen.m. octxls can be -called multiple times consecutively using the same pointer struct, -each time allowing to write data to different ranges and/or -worksheets. oct2xls is a mere wrapper for interface-dependent scripts -that do the actual low-level writing.<BR><BR><B>xlsclose.m</B></P> -<P STYLE="margin-bottom: 0in">Function for closing (the handle to) an -Excel workbook. When data have been written to the workbook oct2xls -will write the workbook to disk. Otherwise, the file pointer is -simply closed and possibly used interfaces for Excel access -(COM/ActiveX/Excel.exe) will be shut down properly.<BR><BR><B>parsecell.m</B></P> -<P STYLE="margin-bottom: 0in">Function for separating the data in raw -arrays returned by xls2oct, into numerical/logical and text (cell) -arrays.</P> +<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>EXCEL +.XLS SUPPORT FILES</B></U></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><B>doc/README-XLS.html</B></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">This +file.</FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><B>xlsread.m</B></FONT></FONT></P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">All-in-one +function for reading data from one specific worksheet in an Excel +spreadsheet file. This script has Matlab-compatible +functionality.<BR><BR><B>xlswrite.m</B></FONT></FONT></P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">All-in-one +function for writing data to one specific worksheet in an Excel +spreadsheet file. This script has Matlab-compatible functionality. +<BR><BR><B>xlsfinfo.m</B></FONT></FONT></P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">All-in-one +function for exploring basic properties of an Excel spreadsheet file. +This script has Matlab-compatible functionality.<BR><BR><B>xlsopen.m</B></FONT></FONT></P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Function +for "opening" (= providing a handle to) an Excel +spreadsheet file ("workbook"). This function sorts out +which interface to use for .xls access (i.e.,COM; Java & Apache +POI; JexcelAPI; etc.), but it's choice can be overridden.<BR><BR><B>xls2oct.m</B></FONT></FONT></P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Function +for reading data from a specific worksheet pointed to in a struct +created by xlsopen.m. xls2oct can be called multiple times +consecutively using the same pointer struct, each time allowing to +read data from different ranges and/or worksheets. Data are returned +in the form of a 2D heterogeneous cell array that can be parsed by +parsecell.m. xls2oct is a mere wrapper for interface-dependent +scripts that do the actual low-level reading .<BR><BR><B>oct2xls.m</B></FONT></FONT></P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Function +for writing data to a specific worksheet pointed to in a struct +created by xlsopen.m. octxls can be called multiple times +consecutively using the same pointer struct, each time allowing to +write data to different ranges and/or worksheets. oct2xls is a mere +wrapper for interface-dependent scripts that do the actual low-level +writing.<BR><BR><B>xlsclose.m</B></FONT></FONT></P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Function +for closing (the handle to) an Excel workbook. When data have been +written to the workbook oct2xls will write the workbook to disk. +Otherwise, the file pointer is simply closed and possibly used +interfaces for Excel access (COM/ActiveX/Excel.exe) will be shut down +properly.<BR><BR><B>parsecell.m</B></FONT></FONT></P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Function +for separating the data in raw arrays returned by xls2oct, into +numerical/logical and text (cell) arrays.</FONT></FONT></P> <P ALIGN=CENTER STYLE="margin-bottom: 0in"><BR> </P> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><BR><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>REQUIRED -SUPPORT SOFTWARE</B></U></FONT></P> -<P STYLE="margin-bottom: 0in"><BR>For the Excel/COM interface:</P> +<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>REQUIRED +SUPPORT SOFTWARE</B></U></FONT></FONT></FONT></P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR>For +the Excel/COM interface:</FONT></FONT></P> <UL> - <LI><P STYLE="margin-bottom: 0in">A windows computer with Excel - installed</P> - <LI><P STYLE="margin-bottom: 0in">Octave-forge Windows-1.0.8 package - WITH LATEST SVN PATCHES APPLIED</P> + <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">A + windows computer with Excel installed</FONT></FONT></P> + <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Octave-forge + Windows-1.0.8 package WITH LATEST SVN PATCHES APPLIED</FONT></FONT></P> </UL> <P STYLE="margin-left: 0.25in; text-indent: -0.26in; margin-bottom: 0in"> <BR> </P> <P STYLE="margin-left: 0.25in; text-indent: -0.26in; margin-bottom: 0in"> -For the Java / Apache POI / JExcelAPI interfaces (general):</P> +<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">For +the Java / Apache POI / JExcelAPI interfaces (general):</FONT></FONT></P> <UL> - <LI><P STYLE="margin-bottom: 0in">octave-forge java-1.2.5 package or - later version on Linux</P> - <LI><P STYLE="margin-bottom: 0in">octave-forge java-1.2.6 with - latest svn fixes on Windows/MingW</P> - <LI><P STYLE="margin-bottom: 0in">Java jre or jdk > 1.6.0 (hasn't - been tested with earlier versions)</P> - <LI><P STYLE="margin-bottom: 0in">./jre/lib/rt.jar in classpath</P> + <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">octave-forge + java-1.2.5 package or later version on Linux</FONT></FONT></P> + <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">octave-forge + java-1.2.6 with latest svn fixes on Windows/MingW</FONT></FONT></P> + <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Java + jre or jdk > 1.6.0 (hasn't been tested with earlier versions)</FONT></FONT></P> + <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">./jre/lib/rt.jar + in classpath</FONT></FONT></P> </UL> -<P STYLE="margin-bottom: 0in">Apache POI specific:</P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Apache +POI specific:</FONT></FONT></P> <UL> - <LI><P STYLE="margin-bottom: 0in">class .jars: - <B>poi-3.5-FINAL-<date>.jar</B> & + <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">class + .jars: <B>poi-3.5-FINAL-<date>.jar</B> & <B>poi-ooxml-3.5-FINAL-<date>.jar</B> (or later versions) in - classpath</P> - <LI><P STYLE="margin-bottom: 0in">Get it here: - <A HREF="http://poi.apache.org/download.html">http://poi.apache.org/download.html</A></P> - <LI><P STYLE="margin-bottom: 0in">for OOXML support (only available - with Apache POI): + classpath</FONT></FONT></P> + <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Get + it here: <A HREF="http://poi.apache.org/download.html">http://poi.apache.org/download.html</A></FONT></FONT></P> + <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">for + OOXML support (only available with Apache POI): </FONT></FONT> </P> - <P STYLE="margin-bottom: 0in">poi-ooxml-schemas-<version>.jar, - xbean.jar, dom4j-1.6.1.jar in javaclasspath. + <P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">poi-ooxml-schemas-<version>.jar, + xbean.jar, dom4j-1.6.1.jar in javaclasspath. </FONT></FONT> </P> - <P STYLE="margin-bottom: 0in">Get them here:</P> - <P STYLE="margin-bottom: 0in"><A HREF="http://poi.apache.org/download.html">http://poi.apache.org/download.html</A> - (“xmlbeans” and poi-ooxml-schemas)</P> - <P STYLE="margin-bottom: 0in"><A HREF="http://sourceforge.net/projects/dom4j/files">http://sourceforge.net/projects/dom4j/files</A> - (dom4j-<version>)</P> + <P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Get + them here:</FONT></FONT></P> + <P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><A HREF="http://poi.apache.org/download.html">http://poi.apache.org/download.html</A> + (“xmlbeans” and poi-ooxml-schemas)</FONT></FONT></P> + <P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><A HREF="http://sourceforge.net/projects/dom4j/files">http://sourceforge.net/projects/dom4j/files</A> + (dom4j-<version>)</FONT></FONT></P> </UL> -<P STYLE="margin-bottom: 0in">JExcelAPI specific:</P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">JExcelAPI +specific:</FONT></FONT></P> <UL> - <LI><P STYLE="margin-bottom: 0in">class .jar: <B>jxl.jar</B> in - classpath</P> - <LI><P STYLE="margin-bottom: 0in">Get it here: - <A HREF="http://sourceforge.net/projects/jexcelapi/files/">http://sourceforge.net/projects/jexcelapi/files/</A></P> + <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">class + .jar: <B>jxl.jar</B> in classpath</FONT></FONT></P> + <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Get + it here: <A HREF="http://sourceforge.net/projects/jexcelapi/files/">http://sourceforge.net/projects/jexcelapi/files/</A></FONT></FONT></P> </UL> -<P STYLE="margin-bottom: 0in">Hint: simply put the relevant -javaaddpath statements in the .octaverc file.</P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Hint: +simply put the relevant javaaddpath statements in the .octaverc file.</FONT></FONT></P> <P ALIGN=CENTER STYLE="margin-bottom: 0in"><BR> </P> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><BR><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>USAGE</B></U></FONT></P> -<P STYLE="margin-bottom: 0in"><BR><B>xlsread</B> and <B>xlswrite</B> -are mere wrappers for <B>xlsopen</B>-<B>xls2oct</B>-<B>xlsclose</B>-<B>parsecell</B> -and <B>xlsopen</B>-<B>oct2xls</B>-<B>xlsclose</B> sequences, resp. -They exist for the sake of Matlab compatibility.<BR><BR><B>xlsfinf</B>o +<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>USAGE</B></U></FONT></FONT></FONT></P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><B>xlsread</B> +and <B>xlswrite</B> are mere wrappers for +<B>xlsopen</B>-<B>xls2oct</B>-<B>xlsclose</B>-<B>parsecell</B> and +<B>xlsopen</B>-<B>oct2xls</B>-<B>xlsclose</B> sequences, resp. They +exist for the sake of Matlab compatibility.<BR><BR><B>xlsfinf</B>o can be used for finding out what worksheet names exist in the file. For OOXML files the input parameter REQINTF should be specified with a value of 'poi' (case-insensitive) and -obviously- the complete POI @@ -172,89 +185,94 @@ Add new data to spreadsheet</I><BR><B>xlh = oct2xls (Newdata, xlh, <AnotherWorksheet>, <Range>)</B><BR><BR><I># Close the workbook and write it to disk; then clear the handle</I><BR><B>xlh = -xlsclose (xlh)</B><BR><B>clear xlh</B></P> +xlsclose (xlh)</B><BR><B>clear xlh</B></FONT></FONT></P> <P STYLE="margin-bottom: 0in"><BR> </P> -<P STYLE="margin-bottom: 0in">When not using the COM interface, -specify a value of 'POI' for parameter REQINTF when accessing OOXML -files in xlsread, xlswrite, xlsopen, xlsfinfo (and be sure the -complete Apache POI interface is installed).</P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">When +not using the COM interface, specify a value of 'POI' for parameter +REQINTF when accessing OOXML files in xlsread, xlswrite, xlsopen, +xlsfinfo (and be sure the complete Apache POI interface is +installed).</FONT></FONT></P> <P STYLE="margin-bottom: 0in"><BR> </P> <P STYLE="margin-bottom: 0in"><BR> </P> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>MATLAB -COMPATIBILITY</B></U></FONT></P> -<P STYLE="margin-bottom: 0in"><BR><B>xlsread</B>, <B>xlswrite</B> and -<B>xlsfinfo</B> are for the most part Matlab-compatible. Some small -differences are mentioned below.<BR><BR><B>xlsread</B><BR>Matlab's -<B>xlsread</B> supports invoking extra functions while reading -("passing function handle"); octave not. But this can be -simulated outside <B>xlsread</B>.<BR><BR>Matlab's <B>xlsread</B> -flags some spreadsheet errors, octave-forge just returns blank -cells.<BR><BR>When using a Java interface, octave-forge returns info -about the actual (rather than the requested) cell range where the -data came from; Matlab and ActiveX/Excel can't. This is due to Excel -automatically trimming returned arrays from empty outer columns and -rows. When using COM, octave has the same limitation.<BR>Personally I -find it very useful to know from what part of a worksheet the data -originate so I've put quite some effort in it :-)</P> +<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>MATLAB +COMPATIBILITY</B></U></FONT></FONT></P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><B>xlsread</B>, +<B>xlswrite</B> and <B>xlsfinfo</B> are for the most part +Matlab-compatible. Some small differences are mentioned +below.<BR><BR><B>xlsread</B><BR>Matlab's <B>xlsread</B> supports +invoking extra functions while reading ("passing function +handle"); octave not. But this can be simulated outside +<B>xlsread</B>.<BR><BR>Matlab's <B>xlsread</B> flags some spreadsheet +errors, octave-forge just returns blank cells.<BR><BR>When using a +Java interface, octave-forge returns info about the actual (rather +than the requested) cell range where the data came from; Matlab and +ActiveX/Excel can't. This is due to Excel automatically trimming +returned arrays from empty outer columns and rows. When using COM, +octave has the same limitation.<BR>Personally I find it very useful +to know from what part of a worksheet the data originate so I've put +quite some effort in it :-)</FONT></FONT></P> <P STYLE="margin-bottom: 0in"><BR> </P> -<P STYLE="margin-bottom: 0in">Matlab's xlsread ignores all -non-numeric data values outside the smallest rectangle encompassing -all numerical values. Octave's xlsread doesn't. This means that -Matlab ignores all row/column headers, not very user-friendly IMO. -<BR><BR>When using the Java interface, reading and writing xls-files -by octave-forge is platform-independent. On systems w/o Excel Matlab -can only read Excel 95 formatted .xls files.<BR><BR>Matlab's <B>xlsread</B> -invokes <B>csvread</B> if no Excel interface is present. -Octave-forge's <B>xlsread</B> doesn't.<BR><BR><B>xlswrite</B><BR>Octave-forge's +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Matlab's +xlsread ignores all non-numeric data values outside the smallest +rectangle encompassing all numerical values. Octave's xlsread +doesn't. This means that Matlab ignores all row/column headers, not +very user-friendly IMO. <BR><BR>When using the Java interface, +reading and writing xls-files by octave-forge is +platform-independent. On systems w/o Excel Matlab can only read Excel +95 formatted .xls files.<BR><BR>Matlab's <B>xlsread</B> invokes +<B>csvread</B> if no Excel interface is present. Octave-forge's +<B>xlsread</B> doesn't.<BR><BR><B>xlswrite</B><BR>Octave-forge's <B>xlswrite</B> works on systems w/o Excel support, Matlab's doesn't -(properly).</P> +(properly).</FONT></FONT></P> <P STYLE="margin-bottom: 0in"><BR> </P> -<P STYLE="margin-bottom: 0in">When specifying a sheet number larger -than the number of existing sheets in an .xls file, Matlab's xlswrite -adds empty sheets until the new sheet number is created; Octave's -xlswrite only adds one sheet called “Sheet<number>” -where <number> is the specified sheet number. +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">When +specifying a sheet number larger than the number of existing sheets +in an .xls file, Matlab's xlswrite adds empty sheets until the new +sheet number is created; Octave's xlswrite only adds one sheet called +“Sheet<number>” where <number> is the +specified sheet number. </FONT></FONT> </P> -<P STYLE="margin-bottom: 0in">Even better (IMO) while M's xlswrite -always creates Sheet1/Sheet2/Sheet3 when creating a new spreadsheet, -octave's xlswrite only creates the requested worksheet.</P> -<P STYLE="margin-bottom: 0in">And octave doesn't touch the “active -sheet”.</P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Even +better (IMO) while M's xlswrite always creates Sheet1/Sheet2/Sheet3 +when creating a new spreadsheet, octave's xlswrite only creates the +requested worksheet.</FONT></FONT></P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">And +octave doesn't touch the “active sheet”.</FONT></FONT></P> <P STYLE="margin-bottom: 0in"><BR> </P> -<P STYLE="margin-bottom: 0in">If the specified write range is larger -than the actual data array, Matlab's xlswrite adds #N/A cells to fill -up the lowermost rows and rightmost columns; octave-forge's xlswrite -doesn't. <BR><BR><B>xlsfinfo</B><BR>When invoking Excel/COM -interface, octave-forge's <B>xlsfinfo</B> also echoes the type of -sheet (worksheet, chart), not just the sheet names. Using Java I -haven't found similar functionality (yet).</P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">If +the specified write range is larger than the actual data array, +Matlab's xlswrite adds #N/A cells to fill up the lowermost rows and +rightmost columns; octave-forge's xlswrite doesn't. <BR><BR><B>xlsfinfo</B><BR>When +invoking Excel/COM interface, octave-forge's <B>xlsfinfo</B> also +echoes the type of sheet (worksheet, chart), not just the sheet +names. Using Java I haven't found similar functionality (yet).</FONT></FONT></P> <P STYLE="margin-bottom: 0in"><BR> </P> <P STYLE="margin-bottom: 0in"><BR> </P> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>COMPARISON -OF INTERFACES & USAGE</B></U></FONT></P> +<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>COMPARISON +OF INTERFACES & USAGE</B></U></FONT></FONT></P> <P STYLE="margin-bottom: 0in"><BR> </P> -<P STYLE="margin-bottom: 0in">Using Excel itself (through COM / -ActiveX on Windows systems) is probably the most robust and versatile -and especially FAST option. There's one gotcha: in case of some type -of COM errors Excel will keep running invisibly, you can only end it -through Task Manager.<BR>A tiny problem is that one cannot find out -easily through COM what file types are supported; xls, wks, wk1, -xlsx, etc.<BR>Another -obvious- limitation is that COM Excel access -only works on Windows systems where Excel is installed.<BR>As -Excel/COM trims returned arrays from empty outer row and columns it -is not easy to find out from what cell range the returned data -originate.<BR><BR>JExcelAPI (Java-based and therefore -platform-independent) is proven technology but switching between -reading and writing is quite involved and memory-hungry when +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Using +Excel itself (through COM / ActiveX on Windows systems) is probably +the most robust and versatile and especially FAST option. There's one +gotcha: in case of some type of COM errors Excel will keep running +invisibly, you can only end it through Task Manager.<BR>A tiny +problem is that one cannot find out easily through COM what file +types are supported; xls, wks, wk1, xlsx, etc.<BR>Another -obvious- +limitation is that COM Excel access only works on Windows systems +where Excel is installed.<BR>As Excel/COM trims returned arrays from +empty outer row and columns it is not easy to find out from what cell +range the returned data originate.<BR><BR>JExcelAPI (Java-based and +therefore platform-independent) is proven technology but switching +between reading and writing is quite involved and memory-hungry when processing large spreadsheets. As the docs state, JExcelAPI is optimized for reading and it does do that well - but slower than Excel/COM. The fact that upon a switch from reading to writing the @@ -264,68 +282,129 @@ next write() doesn't seem to work. The first is by JExcelAPI design, the second is probably a bug (in octave-forge/Java or JExcelAPI ? I don't know). Adding data to existing spreadsheets does work, but IMO -undue user confidence is needed.</P> -<P STYLE="margin-bottom: 0in">JExcelAPI supports BIFF5 and BIFF8 -(Excel 95 and Excel 97-2003, respectively).</P> -<P STYLE="margin-bottom: 0in">JexcelAPI, unlike ApachePOI, doesn't -evaluate functions while reading but instead relies on cached results -(i.e. results computed by Excel itself). Depending on Excel settings -(“Automatic calculation” ON or OFF) this may or may not -yield incorrect results.<BR><BR>Apache POI (Java-based and -platform-independent too) is based on the OpenOffice.org I/O Excel -r/w routines. It is a little more versatile than JExcelAPI, while it -doesn't support BIFF5 it does support BIFF8 (Excel 97 – 2003) -and OOXML (Excel 2007).</P> -<P STYLE="margin-bottom: 0in">It is slower than native JXL let alone -Excel & COM but it features active formula evaluation, although -at the moment (v. 3.6) not all Excel functions have been implemented. -I've made the relevant script (xls2jpoi2oct) fall back on cached -formula results (and yield a suitable warning) for non-implemented -Excel functions while reading Excel files.<BR><BR>All in all, of the -two Java options I'd prefer Apache POI rather than JexcelAPI. But the -latter is indispensable for BIFF5 formats.</P> +undue user confidence is needed.</FONT></FONT></P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">JExcelAPI +supports BIFF5 and BIFF8 (Excel 95 and Excel 97-2003, respectively).</FONT></FONT></P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">JexcelAPI, +unlike ApachePOI, doesn't evaluate functions while reading but +instead relies on cached results (i.e. results computed by Excel +itself). Depending on Excel settings (“Automatic calculation” +ON or OFF) this may or may not yield incorrect results.<BR><BR>Apache +POI (Java-based and platform-independent too) is based on the +OpenOffice.org I/O Excel r/w routines. It is a little more versatile +than JExcelAPI, while it doesn't support BIFF5 it does support BIFF8 +(Excel 97 – 2003) and OOXML (Excel 2007).</FONT></FONT></P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">It +is slower than native JXL let alone Excel & COM but it features +active formula evaluation, although at the moment (v. 3.6) not all +Excel functions have been implemented. I've made the relevant script +(xls2jpoi2oct) fall back on cached formula results (and yield a +suitable warning) for non-implemented Excel functions while reading +Excel files.<BR><BR>All in all, of the two Java options I'd prefer +Apache POI rather than JexcelAPI. But the latter is indispensable for +BIFF5 formats.</FONT></FONT></P> <P STYLE="margin-bottom: 0in"><BR> </P> <P STYLE="margin-bottom: 0in"><BR> </P> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>DEVELOPMENT</B></U></FONT></P> +<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>A +NOTE ON JAVA MEMORY USAGE</B></U></FONT></FONT></P> +<P STYLE="margin-bottom: 0in"><BR> +</P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>Java +memory pool allocation size</B></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">The +java virtual machine (JVM) initializes one big chunk of your +computer's RAM in which all java classes and methods etc. are to be +loaded: the java memory pool. It does this because java has a very +sophisticated “garbage collection” system. At least on +Windows, the initial size is 2MB and the maximum size is 64MB. On +Linux this allocated size is much bigger. This part of memory is +where the java-based ODS octave routines (and the java-based xls +routines) live and keep their variables etc.</FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">For +transferring large pieces of information to and from spreadsheets you +might hit the limits of this pool. E.g. to be able to handle I/O of +an array of around 50,000 cells I needed a memory pool size of 512 +MB.</FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">The +memory size can be increased by inserting a file called “java.opts” +(without quotes) in the directory +./share/octave/packages/java-<version> (where the script file +javaclasspath.m is located), containing just the following lines:</FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; text-decoration: none"><BR> +</P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; text-decoration: none"><FONT FACE="Courier New, monospace"><FONT SIZE=2 STYLE="font-size: 11pt"><B>-Xms16m</B></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; text-decoration: none"><FONT FACE="Courier New, monospace"><FONT SIZE=2 STYLE="font-size: 11pt"><B>-Xmx512m</B></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<BR> +</P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">(where +16 = initial size, 512 = maximum size, m stands for Megabyte).</FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<BR> +</P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">After +processing a large chunk of spreadsheet information you might notice +that octave's memory footprint does not shrink so it looks like +java's memory pool does not shrink back; but rest assured, the memory +footprint is the <I>allocated</I><SPAN STYLE="font-style: normal"> +(reserved) memory size, not the actual used size. After the JVM has +done its garbage collection, only the so-called “working set” +of the memory allocation is really in use and that is a trimmed-down +part of the memory allocation pool. On Windows systems it often +suffices to minimize the octave terminal for a few seconds to get a +more reasonable memory footprint.</SPAN></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<BR> +</P> +<P STYLE="margin-bottom: 0in"><BR> +</P> +<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>DEVELOPMENT</B></U></FONT></FONT></P> <P ALIGN=CENTER STYLE="margin-bottom: 0in"><BR> </P> -<P STYLE="margin-bottom: 0in"><B>xlsopen</B>/<B>xlsclos</B>e and -friends have been written so that adding other interfaces (Perl? +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>xlsopen</B>/<B>xlsclos</B>e +and friends have been written so that adding other interfaces (Perl? native octave? ...?) should be very easily accomplished. <B>xlsopen</B> merely needs two stanzas, <B>xls2oct</B>, <B>oct2xls</B> and <B>xlsfinfo</B> each need an additional elseif clause, and <B>xlsclose</B> needs a -small stanza for closing the pointer struct and writing to disk. +small stanza for closing the pointer struct and writing to disk. </FONT></FONT> </P> -<P STYLE="margin-bottom: 0in">The real work lies in creating the -relevant <B>xls2<...>2oct</B> & <B>oct2<...>2xls</B> -scripts, but that shouldn't be really hard. Separating the file -access functions and the actual reading/writing from/to the workbook -in memory has made developer's life (I mean: my time developing this -stuff) much easier.<BR><BR>Some other options for development (who?):</P> +<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">The +real work lies in creating the relevant <B>xls2<...>2oct</B> & +<B>oct2<...>2xls</B> scripts, but that shouldn't be really +hard. Separating the file access functions and the actual +reading/writing from/to the workbook in memory has made developer's +life (I mean: my time developing this stuff) much easier.<BR><BR>Some +other options for development (who?):</FONT></FONT></P> <UL> - <LI><P STYLE="margin-bottom: 0in">Speeding up, especially Java - worksheet/cell access. For cracks, not me.</P> - <LI><P STYLE="margin-bottom: 0in">Automatic conversion of Excel - date/time values into octave ones and vice versa. But then again - Excel's dates are 01-01-1900 based (octave's 0-0-0000) and buggy - (Excel thinks 1900 is a leap year), and I sometimes have to use - dates from before 1900. Maybe as an option?</P> - <LI><P STYLE="margin-bottom: 0in">Creating Excel graphs (a - significant enterprise to write from scratch).</P> - <LI><P STYLE="margin-bottom: 0in">Support for "passing function - handle" in xlsread.</P> + <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Speeding + up, especially Java worksheet/cell access. For cracks, not me.</FONT></FONT></P> + <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Automatic + conversion of Excel date/time values into octave ones and vice + versa. But then again Excel's dates are 01-01-1900 based (octave's + 0-0-0000) and buggy (Excel thinks 1900 is a leap year), and I + sometimes have to use dates from before 1900. Maybe as an option?</FONT></FONT></P> + <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Creating + Excel graphs (a significant enterprise to write from scratch).</FONT></FONT></P> + <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Support + for "passing function handle" in xlsread.</FONT></FONT></P> </UL> <P STYLE="margin-left: 0.26in; text-indent: -0.26in; margin-bottom: 0in"> <BR> </P> <P STYLE="margin-left: 0.26in; text-indent: -0.26in; margin-bottom: 0in"> -Enjoy!</P> +<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Enjoy!</FONT></FONT></P> <P STYLE="margin-left: 0.26in; text-indent: -0.26in; margin-bottom: 0in"> <BR> </P> <P ALIGN=CENTER STYLE="margin-left: 0.26in; text-indent: -0.26in; margin-bottom: 0in"> -Philip Nienhuis, Jan 12, 2010</P> +<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Philip +Nienhuis, Jan 18, 2010</FONT></FONT></P> </BODY> </HTML> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <prn...@us...> - 2010-03-01 15:41:46
|
Revision: 6978 http://octave.svn.sourceforge.net/octave/?rev=6978&view=rev Author: prnienhuis Date: 2010-03-01 15:41:38 +0000 (Mon, 01 Mar 2010) Log Message: ----------- Adapted javaclasspath requirements (rt.jar not needed) Modified Paths: -------------- trunk/octave-forge/main/io/doc/READ-ODS.html trunk/octave-forge/main/io/doc/READ-XLS.html Modified: trunk/octave-forge/main/io/doc/READ-ODS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-ODS.html 2010-03-01 15:31:40 UTC (rev 6977) +++ trunk/octave-forge/main/io/doc/READ-ODS.html 2010-03-01 15:41:38 UTC (rev 6978) @@ -3,11 +3,11 @@ <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> <TITLE></TITLE> - <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.0 (Win32)"> + <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> <META NAME="AUTHOR" CONTENT="Philip Nienhuis"> <META NAME="CREATED" CONTENT="20091229;22213000"> <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGED" CONTENT="20100118;21551300"> + <META NAME="CHANGED" CONTENT="20100301;16382300"> <META NAME="Info 1" CONTENT=""> <META NAME="Info 2" CONTENT=""> <META NAME="Info 3" CONTENT=""> @@ -16,160 +16,158 @@ <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> + <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> <STYLE TYPE="text/css"> <!-- - @page { margin: 0.79in } - P { margin-bottom: 0.08in } + @page { margin: 2.01cm } + P { margin-bottom: 0.2cm } A:link { so-language: zxx } --> </STYLE> </HEAD> <BODY LANG="en-US" DIR="LTR"> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><U><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 16pt"><B>ODS +<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><U><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 16pt"><B>ODS support for Octave</B></U></FONT></FONT></P> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><BR> +<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Copyright -© 2009 Philip Nienhuis <prnienhuis at users.sf.net></FONT></FONT></P> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><BR> +<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Copyright +© 2009, 2010 Philip Nienhuis <prnienhuis at users.sf.net></FONT></FONT></P> +<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2>This -version January 18, 2010</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2>This +version March 1, 2010</FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I>(ODS +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I>(ODS = Open Document Format spreadsheet data format, used by e.g., OpenOffice.org.)</I></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><U><B>Files +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><U><B>Files content</B></U></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-left: 1.98in; text-indent: -1.98in; margin-bottom: 0in"> +<P ALIGN=LEFT STYLE="margin-left: 5.03cm; text-indent: -5.03cm; margin-bottom: 0cm"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I><B>odsread.m</B></I></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">No-hassle +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">No-hassle read script for reading from an ODS file and parsing the numeric and text data into separate arrays.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-left: 1.98in; text-indent: -1.98in; margin-bottom: 0in"> +<P ALIGN=LEFT STYLE="margin-left: 5.03cm; text-indent: -5.03cm; margin-bottom: 0cm"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I><B>odswrite.m</B></I></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">No-hassle +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">No-hassle write script for writing to an ODS file.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-left: 1.98in; text-indent: -1.98in; margin-bottom: 0in"> +<P ALIGN=LEFT STYLE="margin-left: 5.03cm; text-indent: -5.03cm; margin-bottom: 0cm"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I><B>odsopen.m</B></I></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 1.98in; text-indent: -1.98in; margin-bottom: 0in"> +<P ALIGN=LEFT STYLE="margin-left: 5.03cm; text-indent: -5.03cm; margin-bottom: 0cm"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Get a file pointer to an ODS spreadsheet file.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I><B>ods2oct.m</B></I></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Read +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I><B>ods2oct.m</B></I></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Read raw data from an ODS spreadsheet file using the file pointer handed by odsopen.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I><B>oct2ods.m</B></I></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Write +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I><B>oct2ods.m</B></I></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Write data to an ODS spreadsheet file using the file pointer handed by odsopen.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I><B>odsclose.m</B></I></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Close +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I><B>odsclose.m</B></I></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Close file handle made by odsopen and -if data have been transfered to a spreadsheet- save data.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I><B>odsfinfo.m</B></I></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Explore +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I><B>odsfinfo.m</B></I></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Explore sheet names and optionally estimated data size of ods files with unknown content.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I><B>calccelladdress.m</B></I></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Utility +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I><B>calccelladdress.m</B></I></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Utility function needed for jOpenDocument class.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I><B>parsecell.m</B></I></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">(contained +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><I><B>parsecell.m</B></I></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">(contained in Excel xlsread scripts, but works also for ods support) parse raw data (cell array) into separate numeric array and text (cell) array.)</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><BR> </P> -<P ALIGN=CENTER STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>REQUIRED +<P ALIGN=CENTER STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>REQUIRED SUPPORT SOFTWARE</B></U></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-left: 1.98in; text-indent: -1.98in; margin-bottom: 0in"> +<P ALIGN=LEFT STYLE="margin-left: 5.03cm; text-indent: -5.03cm; margin-bottom: 0cm"> <BR> </P> -<P ALIGN=LEFT STYLE="margin-left: 1.98in; text-indent: -1.98in; margin-bottom: 0in"> +<P ALIGN=LEFT STYLE="margin-left: 5.03cm; text-indent: -5.03cm; margin-bottom: 0cm"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">For Windows (MingW):</FONT></FONT></P> <UL> - <LI><P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">octave + <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">octave with java package (>= 1.2.6)</FONT></FONT></P> </UL> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">For +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">For Linux:</FONT></FONT></P> <UL> - <LI><P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">octave + <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">octave with java package (>= 1.2.5; earlier versions not tested)</FONT></FONT></P> </UL> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">For +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">For ODS access, you'll need to choose at least one of the following java class files collections:</FONT></FONT></P> <UL> - <LI><P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">(currently - the preferred option) <B>odfdom.jar</B> & <B>xercesImpl.jar</B>. - Get them here:</FONT></FONT></P> - <LI><P ALIGN=LEFT STYLE="margin-bottom: 0in"><A HREF="http://odftoolkit.org/projects/odfdom/downloads/directory/current-version"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">http://odftoolkit.org/projects/odfdom/downloads/directory/current-version</FONT></FONT></A></P> - <LI><P ALIGN=LEFT STYLE="margin-bottom: 0in"><A HREF="http://xerces.apache.org/mirrors.cgi"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">http://xerces.apache.org/mirrors.cgi</FONT></FONT></A></P> + <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">(currently + the preferred option) <B>odfdom.jar</B> (only version 0.7.5 works + OK!) & <B>xercesImpl.jar</B>. Get them here:</FONT></FONT></P> + <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><A HREF="http://odftoolkit.org/projects/odfdom/downloads/directory/previous-versions%252Freleases"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">http://odftoolkit.org/projects/odfdom/downloads/directory/previous-versions%252Freleases</FONT></FONT></A></P> + <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><A HREF="http://xerces.apache.org/mirrors.cgi"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">http://xerces.apache.org/mirrors.cgi</FONT></FONT></A></P> </UL> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">and/or</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">and/or</FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> <UL> - <LI><P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>jopendocument</B></FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-weight: normal"><version></SPAN></FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>.jar</B></FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">. + <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>jopendocument</B></FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-weight: normal"><version></SPAN></FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>.jar</B></FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">. Get it from <A HREF="http://www.jopendocument.org/">http://www.jopendocument.org</A></FONT></FONT></P> </UL> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> <UL> - <P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">These, - plus the </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>rt.jar</B></FONT></FONT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-weight: normal">from - your local java installation (jre or jdk) must be referenced with - full pathnames in your javaclasspath. Hint: add it in - ./share/octave/<version>/m/startup/octaverc using appropriate - javaaddpath statements.</SPAN></FONT></FONT></P> + <P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">These</FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-weight: normal"> + must be referenced with full pathnames in your javaclasspath. Hint: + add it in ./share/octave/<version>/m/startup/octaverc using + appropriate javaaddpath statements.</SPAN></FONT></FONT></P> </UL> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=CENTER STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>USAGE</B></U></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=CENTER STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>USAGE</B></U></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">(see “help ods<function_filename>” in octave terminal.)</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><SPAN STYLE="text-decoration: none"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>odsread</B></FONT></FONT></SPAN><SPAN STYLE="text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><SPAN STYLE="text-decoration: none"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>odsread</B></FONT></FONT></SPAN><SPAN STYLE="text-decoration: none"> </SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-weight: normal">is a sort of analog to xlsread and works more or less the same. </SPAN></FONT></FONT></SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>odsread </B></FONT></FONT></SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-weight: normal">is @@ -179,25 +177,25 @@ that do file access and the actual reading, plus </SPAN></FONT></FONT></SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>parsecell</B></FONT></FONT></SPAN><SPAN STYLE="text-decoration: none"> </SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-weight: normal">for post-processing.</SPAN></FONT></FONT></SPAN></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><SPAN STYLE="text-decoration: none"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>odswrite</B></FONT></FONT></SPAN><SPAN STYLE="text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><SPAN STYLE="text-decoration: none"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>odswrite</B></FONT></FONT></SPAN><SPAN STYLE="text-decoration: none"> </SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-weight: normal">works similar to xlswrite. It too is a wrapper for scripts which do the actual work and invoke other scripts.</SPAN></FONT></FONT></SPAN></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><SPAN STYLE="text-decoration: none"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>odsfinfo</B></FONT></FONT></SPAN><SPAN STYLE="text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><SPAN STYLE="text-decoration: none"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>odsfinfo</B></FONT></FONT></SPAN><SPAN STYLE="text-decoration: none"> </SPAN><SPAN STYLE="text-decoration: none"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-weight: normal">can be used to explore odsfiles with unknown content for sheet names and to get an impression of the data content sizes.</SPAN></FONT></FONT></SPAN></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">When you need data from just one sheet, odsread is for you. </FONT></FONT> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">But when you need data from multiple sheets in the same spreadsheet file, or if you want to process spreadsheet data by limited-size chunks at @@ -205,59 +203,59 @@ sequences provides for much more speed and flexibility as the spreadsheet needs to be read just once rather than repeatedly for each call to odsread.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Same reasoning goes for odswrite.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Also, if you use odsopen / …../, you can process multiple spreadsheets simultaneously – just use odsopen repeatedly to get multiple spreadsheet file pointers.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Moreover, after adding data to an existing spreadsheet file, you can fiddle with the filename in the ods file pointer struct to save the data into another, possibly new spreadsheet file.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">If you use odsopen / ods2oct / … / odsclose, DO NOT FORGET to invoke odsclose in the end. The file pointers can contain an enormous amount of data and may needlessly keep precious memory allocated.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=CENTER STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>GOTCHAS</B></U></FONT></FONT></P> -<P ALIGN=CENTER STYLE="margin-left: 0.01in; margin-bottom: 0in"><BR> +<P ALIGN=CENTER STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>GOTCHAS</B></U></FONT></FONT></P> +<P ALIGN=CENTER STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">I know of one big gotcha: i.e. reading dates (& time). A less obvious one is java memory pool allocation size.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>Date +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>Date and time in ODS</B></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Octave (as does Matlab) stores dates as a number representing the number of days since January 1, 0 (and as an aside ignores a.o. Pope Gregorius' intervention in 1582 when 10 days were simply skipped).</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">OpenOffice.org stores dates as text strings like “yyyy-mm-dd”.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">MS-Excel stores dates as a number representing the number of days since January 1, 1900 (and as an aside, erroneously assumes 1900 to be a leap year).</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Now, converting OpenOffice.org date cell values into Octave looks pretty straightforward. But when the ODS spreadsheet was originally an Excel @@ -265,27 +263,27 @@ OOo date values (i.e.,strings) OR old numerical values from the Excel spreadsheet. </FONT></FONT> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">So: you should carefully check what happens to date cells.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">As octave has no ”date” or “time” data type, octave date values (usually numerical data) are simply transferred as “floats” to ODS spreadsheets. You'll have to convert the values into dates yourself from within OpenOffice.org.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">While adding data and time values has been implemented in the write scripts, the wait is for clever solutions to distinguish dates from floats in octave cell arrays.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>Java +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><B>Java memory pool allocation size</B></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">The java virtual machine (JVM) initializes one big chunk of your computer's RAM in which all java classes and methods etc. are to be @@ -295,89 +293,87 @@ Linux this allocated size is much bigger. This part of memory is where the java-based ODS octave routines (and the java-based xls routines) live and keep their variables etc.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">For transferring large pieces of information to and from spreadsheets you might hit the limits of this pool. E.g. to be able to handle I/O of an array of around 50,000 cells I needed a memory pool size of 512 MB.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">The memory size can be increased by inserting a file called “java.opts” (without quotes) in the directory ./share/octave/packages/java-<version> (where the script file javaclasspath.m is located), containing just the following lines:</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; text-decoration: none"><FONT FACE="Courier New, monospace"><FONT SIZE=2 STYLE="font-size: 11pt"><B>-Xms16m</B></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; text-decoration: none"><FONT FACE="Courier New, monospace"><FONT SIZE=2 STYLE="font-size: 11pt"><B>-Xmx512m</B></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; text-decoration: none"><FONT FACE="Courier New, monospace"><FONT SIZE=2 STYLE="font-size: 11pt"><B>-Xms16m</B></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; text-decoration: none"><FONT FACE="Courier New, monospace"><FONT SIZE=2 STYLE="font-size: 11pt"><B>-Xmx512m</B></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">(where 16 = initial size, 512 = maximum size, m stands for Megabyte).</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">After processing a large chunk of spreadsheet information you might notice that octave's memory footprint does not shrink so it looks like java's memory pool does not shrink back; but rest assured, the memory -footprint is the <I>allocated</I><SPAN STYLE="font-style: normal"> -(reserved) memory size, not the actual used size. After the JVM has -done its garbage collection, only the so-called “working set” -of the memory allocation is really in use and that is a trimmed-down +footprint is the <I>allocated</I> <SPAN STYLE="font-style: normal">(reserved) +memory size, not the actual used size. After the JVM has done its +garbage collection, only the so-called “working set” of +the memory allocation is really in use and that is a trimmed-down part of the memory allocation pool. On Windows systems it often suffices to minimize the octave terminal for a few seconds to get a more reasonable memory footprint.</SPAN></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> -<BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> -<BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Smaller gotcha's (only with jOpenDocument):</FONT></FONT></P> <UL> - <LI><P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> + <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">While reading, empty cells are sometimes not skipped but interpreted with numerical value 0 (zero).</FONT></FONT></P> - <LI><P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> + <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">A valid range MUST be specified, I haven't found a way to discover the actual occupied rows and columns (jOpenDocument can give the physical ones (= capacity) but that doesn't help).</FONT></FONT></P> </UL> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=CENTER STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>MATLAB +<P ALIGN=CENTER STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>MATLAB COMPATIBILITY</B></U></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">AFAIK there's no similar functionality in Matlab (yet?).</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">odsread is fairly function-compatible to xlsread, however.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Same goes for odswrite, odsfinfo and xlsfinfo – however odsinfo has better functionality IMO.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=CENTER STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>COMPARISON +<P ALIGN=CENTER STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>COMPARISON OF INTERFACES</B></U></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">The ODFtoolkit (& associated xerces) interface is the one that gives the best (but slow) results at present. However, parsing xml trees into rectangular arrays is not quite straightforward and the other way round is a real nightmare; odftoolkit does little to hide the gory details for the developers.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">While reading ODS is still OK, writing implies checking whether cells already exist explicitly (in table:table-cells) or implicitly (in @@ -387,66 +383,66 @@ rebuilding possibly large parts of the tree in memory - nothing for the faint-of-heart. And odftoolkit lets you sort it out all by yourself.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">The jOpenDocument interface is the most promising, as it does shield the xml tree details and presents developers something which looks like a spreadsheet model.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">However, unfortunately the developers decided to shield essential methods by making them 'protected' (e.g. the vital getCellType). Extracting sheet names is not implemented in released versions (yet).</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">JopenDocument does support writing, however I couldn't reliably create new MutableCells beyond column 1 no matter how hard I tried. The developers gave me hints but I haven't found a final solution yet.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">And last (but not least) the jOpenDocument developers state that their development is primarily driven by requests from customers who pay for support. I do sympathize with this business model but for octave needs this may hamper progress for a while.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=CENTER STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>DEVELOPMENT</B></U></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=CENTER STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>DEVELOPMENT</B></U></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">As with the Excel r/w stuff, adding new interfaces should be easy and straightforward.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Suggestions for future development:</FONT></FONT></P> <UL> - <LI><P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> + <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Reliable and easy ODS write support (maybe when jOpenDocument is more mature)</FONT></FONT></P> - <LI><P ALIGN=LEFT STYLE="margin-bottom: 0in; font-weight: normal; text-decoration: none"> + <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Speeding up (ODS is 10 X slower than e.g. OOXML !!!). jOpenDocument is muchfasterbut </FONT></FONT> </P> - <LI><P ALIGN=LEFT STYLE="margin-bottom: 0in; text-decoration: none">“<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-weight: normal">Passing + <LI><P ALIGN=LEFT STYLE="margin-bottom: 0cm; text-decoration: none">“<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-weight: normal">Passing function handle” a la Matlab's xlsread.</SPAN></FONT></FONT></P> </UL> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=LEFT STYLE="margin-left: 0.02cm; margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Enjoy!</FONT></FONT></P> -<P STYLE="margin-left: 0.26in; text-indent: -0.26in; margin-bottom: 0in"> +<P STYLE="margin-left: 0.66cm; text-indent: -0.66cm; margin-bottom: 0cm"> <BR> </P> -<P ALIGN=CENTER STYLE="margin-left: 0.26in; text-indent: -0.26in; margin-bottom: 0in; font-weight: normal; text-decoration: none"> +<P ALIGN=CENTER STYLE="margin-left: 0.66cm; text-indent: -0.66cm; margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Philip -Nienhuis, Jan 18, 2010</FONT></FONT></P> +Nienhuis, Mar 01, 2010</FONT></FONT></P> </BODY> </HTML> \ No newline at end of file Modified: trunk/octave-forge/main/io/doc/READ-XLS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-XLS.html 2010-03-01 15:31:40 UTC (rev 6977) +++ trunk/octave-forge/main/io/doc/READ-XLS.html 2010-03-01 15:41:38 UTC (rev 6978) @@ -3,11 +3,11 @@ <HEAD> <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> <TITLE></TITLE> - <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.0 (Win32)"> + <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> <META NAME="AUTHOR" CONTENT="Philip Nienhuis"> <META NAME="CREATED" CONTENT="20091211;17230700"> <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGED" CONTENT="20100118;21550000"> + <META NAME="CHANGED" CONTENT="20100301;16403500"> <META NAME="Info 1" CONTENT=""> <META NAME="Info 2" CONTENT=""> <META NAME="Info 3" CONTENT=""> @@ -19,46 +19,47 @@ <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> + <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> <STYLE TYPE="text/css"> <!-- - @page { margin: 0.79in } - P { margin-bottom: 0.08in } + @page { margin: 2.01cm } + P { margin-bottom: 0.2cm } A:link { so-language: zxx } --> </STYLE> </HEAD> <BODY LANG="en-US" DIR="LTR"> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">README +<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">README for Excel spreadsheet file r/w access scripts for octave (> -3.2.0)<BR><BR>Copyright (C) 2009, Philip Nienhuis <prnienhuis at -users.sf.net><BR><BR>This version 18 January 2010.</FONT></FONT></P> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><BR> +3.2.0)<BR><BR>Copyright (C) 2009, 2010 Philip Nienhuis <prnienhuis +at users.sf.net><BR><BR>This version 1 March 2010.</FONT></FONT></P> +<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>EXCEL +<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>EXCEL .XLS SUPPORT FILES</B></U></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><B>doc/README-XLS.html</B></FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">This +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><B>doc/README-XLS.html</B></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">This file.</FONT></FONT></P> -<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><B>xlsread.m</B></FONT></FONT></P> -<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">All-in-one +<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><B>xlsread.m</B></FONT></FONT></P> +<P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">All-in-one function for reading data from one specific worksheet in an Excel spreadsheet file. This script has Matlab-compatible functionality.<BR><BR><B>xlswrite.m</B></FONT></FONT></P> -<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">All-in-one +<P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">All-in-one function for writing data to one specific worksheet in an Excel spreadsheet file. This script has Matlab-compatible functionality. <BR><BR><B>xlsfinfo.m</B></FONT></FONT></P> -<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">All-in-one +<P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">All-in-one function for exploring basic properties of an Excel spreadsheet file. This script has Matlab-compatible functionality.<BR><BR><B>xlsopen.m</B></FONT></FONT></P> -<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Function +<P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Function for "opening" (= providing a handle to) an Excel spreadsheet file ("workbook"). This function sorts out which interface to use for .xls access (i.e.,COM; Java & Apache POI; JexcelAPI; etc.), but it's choice can be overridden.<BR><BR><B>xls2oct.m</B></FONT></FONT></P> -<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Function +<P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Function for reading data from a specific worksheet pointed to in a struct created by xlsopen.m. xls2oct can be called multiple times consecutively using the same pointer struct, each time allowing to @@ -66,86 +67,84 @@ in the form of a 2D heterogeneous cell array that can be parsed by parsecell.m. xls2oct is a mere wrapper for interface-dependent scripts that do the actual low-level reading .<BR><BR><B>oct2xls.m</B></FONT></FONT></P> -<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Function +<P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Function for writing data to a specific worksheet pointed to in a struct created by xlsopen.m. octxls can be called multiple times consecutively using the same pointer struct, each time allowing to write data to different ranges and/or worksheets. oct2xls is a mere wrapper for interface-dependent scripts that do the actual low-level writing.<BR><BR><B>xlsclose.m</B></FONT></FONT></P> -<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Function +<P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Function for closing (the handle to) an Excel workbook. When data have been written to the workbook oct2xls will write the workbook to disk. Otherwise, the file pointer is simply closed and possibly used interfaces for Excel access (COM/ActiveX/Excel.exe) will be shut down properly.<BR><BR><B>parsecell.m</B></FONT></FONT></P> -<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Function +<P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Function for separating the data in raw arrays returned by xls2oct, into numerical/logical and text (cell) arrays.</FONT></FONT></P> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><BR> +<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>REQUIRED +<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>REQUIRED SUPPORT SOFTWARE</B></U></FONT></FONT></FONT></P> -<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR>For +<P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR>For the Excel/COM interface:</FONT></FONT></P> <UL> - <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">A + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">A windows computer with Excel installed</FONT></FONT></P> - <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Octave-forge + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Octave-forge Windows-1.0.8 package WITH LATEST SVN PATCHES APPLIED</FONT></FONT></P> </UL> -<P STYLE="margin-left: 0.25in; text-indent: -0.26in; margin-bottom: 0in"> +<P STYLE="margin-left: 0.64cm; text-indent: -0.66cm; margin-bottom: 0cm"> <BR> </P> -<P STYLE="margin-left: 0.25in; text-indent: -0.26in; margin-bottom: 0in"> +<P STYLE="margin-left: 0.64cm; text-indent: -0.66cm; margin-bottom: 0cm"> <FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">For the Java / Apache POI / JExcelAPI interfaces (general):</FONT></FONT></P> <UL> - <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">octave-forge + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">octave-forge java-1.2.5 package or later version on Linux</FONT></FONT></P> - <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">octave-forge + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">octave-forge java-1.2.6 with latest svn fixes on Windows/MingW</FONT></FONT></P> - <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Java + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Java jre or jdk > 1.6.0 (hasn't been tested with earlier versions)</FONT></FONT></P> - <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">./jre/lib/rt.jar - in classpath</FONT></FONT></P> </UL> -<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Apache +<P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Apache POI specific:</FONT></FONT></P> <UL> - <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">class + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">class .jars: <B>poi-3.5-FINAL-<date>.jar</B> & <B>poi-ooxml-3.5-FINAL-<date>.jar</B> (or later versions) in classpath</FONT></FONT></P> - <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Get + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Get it here: <A HREF="http://poi.apache.org/download.html">http://poi.apache.org/download.html</A></FONT></FONT></P> - <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">for + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">for OOXML support (only available with Apache POI): </FONT></FONT> </P> - <P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">poi-ooxml-schemas-<version>.jar, + <P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">poi-ooxml-schemas-<version>.jar, xbean.jar, dom4j-1.6.1.jar in javaclasspath. </FONT></FONT> </P> - <P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Get + <P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Get them here:</FONT></FONT></P> - <P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><A HREF="http://poi.apache.org/download.html">http://poi.apache.org/download.html</A> + <P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><A HREF="http://poi.apache.org/download.html">http://poi.apache.org/download.html</A> (“xmlbeans” and poi-ooxml-schemas)</FONT></FONT></P> - <P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><A HREF="http://sourceforge.net/projects/dom4j/files">http://sourceforge.net/projects/dom4j/files</A> + <P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><A HREF="http://sourceforge.net/projects/dom4j/files">http://sourceforge.net/projects/dom4j/files</A> (dom4j-<version>)</FONT></FONT></P> </UL> -<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">JExcelAPI +<P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">JExcelAPI specific:</FONT></FONT></P> <UL> - <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">class + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">class .jar: <B>jxl.jar</B> in classpath</FONT></FONT></P> - <LI><P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Get + <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Get it here: <A HREF="http://sourceforge.net/projects/jexcelapi/files/">http://sourceforge.net/projects/jexcelapi/files/</A></FONT></FONT></P> </UL> -<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Hint: +<P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">Hint: simply put the relevant javaaddpath statements in the .octaverc file.</FONT></FONT></P> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><BR> +<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>USAGE</B></U></FONT></FONT></FONT></P> -<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><B>xlsread</B> +<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>USAGE</B></U></FONT></FONT></FONT></P> +<P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><B>xlsread</B> and <B>xlswrite</B> are mere wrappers for <B>xlsopen</B>-<B>xls2oct</B>-<B>xlsclose</B>-<B>parsecell</B> and <B>xlsopen</B>-<B>oct2xls</B>-<B>xlsclose</B> sequences, resp. They @@ -186,20 +185,20 @@ <AnotherWorksheet>, <Range>)</B><BR><BR><I># Close the workbook and write it to disk; then clear the handle</I><BR><B>xlh = xlsclose (xlh)</B><BR><B>clear xlh</B></FONT></FONT></P> -<P STYLE="margin-bottom: 0in"><BR> +<P STYLE="margin-bottom: 0cm"><BR> </P> -<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">When +<P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt">When not using the COM interface, specify a value of 'POI' for parameter REQINTF when accessing OOXML files in xlsread, xlswrite, xlsopen, xlsfinfo (and be sure the complete Apache POI interface is installed).</FONT></FONT></P> -<P STYLE="margin-bottom: 0in"><BR> +<P STYLE="margin-bottom: 0cm"><BR> </P> -<P STYLE="margin-bottom: 0in"><BR> +<P STYLE="margin-bottom: 0cm"><BR> </P> -<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>MATLAB +<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>MATLAB COMPATIBILITY</B></U></FONT></FONT></P> -<P STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><B>xlsread</B>, +<P STYLE="margin-bottom: 0cm"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><BR><B>xlsread</B>, <B>xlswrite</B> and <B>xlsfinfo</B> are for ... [truncated message content] |
From: <prn...@us...> - 2011-02-16 21:52:30
|
Revision: 8120 http://octave.svn.sourceforge.net/octave/?rev=8120&view=rev Author: prnienhuis Date: 2011-02-16 21:52:20 +0000 (Wed, 16 Feb 2011) Log Message: ----------- Updated for io-1.0.14; layout improved. Modified Paths: -------------- trunk/octave-forge/main/io/doc/READ-ODS.html trunk/octave-forge/main/io/doc/READ-XLS.html Modified: trunk/octave-forge/main/io/doc/READ-ODS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-ODS.html 2011-02-15 22:02:21 UTC (rev 8119) +++ trunk/octave-forge/main/io/doc/READ-ODS.html 2011-02-16 21:52:20 UTC (rev 8120) @@ -1,625 +1,457 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> -<HTML> -<HEAD> - <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> - <TITLE></TITLE> - <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> - <META NAME="AUTHOR" CONTENT="Philip Nienhuis"> - <META NAME="CREATED" CONTENT="20091229;22213000"> - <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGED" CONTENT="20101114;18275600"> - <META NAME="Info 1" CONTENT=""> - <META NAME="Info 2" CONTENT=""> - <META NAME="Info 3" CONTENT=""> - <META NAME="Info 4" CONTENT=""> - <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> -</HEAD> -<BODY LANG="en-US" DIR="LTR"> -<P ALIGN=CENTER><U><FONT FACE="Arial, sans-serif"><FONT SIZE=4><B>ODS -support for Octave</B></U></FONT></FONT><P ALIGN=CENTER> -<BR> -<P ALIGN=CENTER><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Copyright -© 2009, 2010 Philip Nienhuis <prnienhuis at users.sf.net></FONT></FONT><P ALIGN=CENTER> -<BR> -<P ALIGN=CENTER><FONT FACE="Arial, sans-serif"><FONT SIZE=2>This -version November 14, 2010</FONT></FONT><DL> - <DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I>(ODS = Open +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> +<html><head> + <meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252"> + + <title></title><meta name="GENERATOR" content="OpenOffice.org 3.2 (Win32)"> + <meta name="AUTHOR" content="Philip Nienhuis"> + <meta name="CREATED" content="20091229;22213000"> + <meta name="CHANGEDBY" content="Philip Nienhuis"> + <meta name="CHANGED" content="20101114;18275600"> + <meta name="Info 1" content=""> + <meta name="Info 2" content=""> + <meta name="Info 3" content=""> + <meta name="Info 4" content=""> + <meta name="CHANGEDBY" content="Philip Nienhuis"> + <meta name="CHANGEDBY" content="Philip Nienhuis"> + <meta name="CHANGEDBY" content="Philip Nienhuis"> + <meta name="CHANGEDBY" content="Philip Nienhuis"> + <meta name="CHANGEDBY" content="Philip Nienhuis"> + <meta name="CHANGEDBY" content="Philip Nienhuis"> + <meta name="CHANGEDBY" content="Philip Nienhuis"> + <meta name="CHANGEDBY" content="Philip Nienhuis"> + <meta name="CHANGEDBY" content="Philip Nienhuis"> + <meta name="CHANGEDBY" content="Philip Nienhuis"> + <meta name="CHANGEDBY" content="Philip Nienhuis"> + <meta name="CHANGEDBY" content="Philip Nienhuis"> + <meta name="CHANGEDBY" content="Philip Nienhuis"> + <meta name="CHANGEDBY" content="Philip Nienhuis"></head> + +<body dir="ltr" lang="en-US"> +<p align="center"><u><font face="Arial, sans-serif"><font size="4"><b>ODS +support for Octave</b></font></font></u></p><p align="center"><font face="Arial, sans-serif"><font size="2">Copyright +\xA9 2009 - 2011 Philip Nienhuis <prnienhuis at users.sf.net></font></font></p><p align="center"><font face="Arial, sans-serif"><font size="2">This +version February 16, 2011</font></font></p> + <p><font face="Arial, sans-serif"><font size="2"><i>(ODS = Open Document Format spreadsheet data format, used by e.g., - OpenOffice.org.)</I></FONT></FONT><DT><P> - <BR> - <DT><P><BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2><U><B>Files - content</B></U></FONT></FONT><DT><P> - <BR> - <DL> - <DL> - <DL> - <DL> - <DD><P ALIGN=LEFT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I><B>odsread.m</B></I></FONT></FONT></DL> - </DL> - </DL> - </DL> - <DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>No-hassle read script + OpenOffice.org.)</i></font></font></p><p><font face="Arial, sans-serif"><font size="2"><i></i></font></font></p><dl><dt><p align="left"><font face="Arial, sans-serif"><font size="2"><u><b>Files + content</b></u></font></font></p></dt><dt><p align="left"><font face="Arial, sans-serif"><font size="2"><i><b>odsread.m</b></i><br>No-hassle read script for reading from an ODS file and parsing the numeric and text data - into separate arrays.</FONT></FONT><DT><P> - <BR> - <DL> - <DL> - <DL> - <DL> - <DD><P ALIGN=LEFT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I><B>odswrite.m</B></I></FONT></FONT></DL> - </DL> - </DL> - </DL> - <DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>No-hassle write script - for writing to an ODS file.</FONT></FONT><DT><P> - <BR> - <DL> - <DL> - <DL> - <DL> - <DD><P ALIGN=LEFT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I><B>odsopen.m</B></I></FONT></FONT><DD><P ALIGN=LEFT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>Get a file pointer - to an ODS spreadsheet file.</FONT></FONT></DL> - </DL> - </DL> - </DL> - <DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I><B>ods2oct.m</B></I></FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>Read raw data from an - ODS spreadsheet file using the file pointer handed by odsopen.</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I><B>oct2ods.m</B></I></FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>Write data to an ODS - spreadsheet file using the file pointer handed by odsopen.</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I><B>odsclose.m</B></I></FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>Close file handle made + into separate arrays.<br></font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><i><b>odswrite.m</b></i><br>No-hassle write script + for writing to an ODS file.</font></font></p></dt><dt><font face="Arial, sans-serif"><font size="2"><i><b>odsopen.m</b></i></font></font> </dt><dt><font face="Arial, sans-serif"><font size="2">Get a file pointer + to an ODS spreadsheet file.</font></font></dt><dl><dl><dl> + </dl> + </dl> + </dl> + <dt><p><font face="Arial, sans-serif"><font size="2"><i><b>ods2oct.m</b></i><br>Read raw data from an + ODS spreadsheet file using the file pointer handed by odsopen.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><i><b>oct2ods.m</b></i><br>Write data to an ODS + spreadsheet file using the file pointer handed by odsopen.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><i><b>odsclose.m</b></i><br>Close file handle made by odsopen and -if data have been transfered to a spreadsheet- save - data.</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I><B>odsfinfo.m</B></I></FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>Explore sheet names and - optionally estimated data size of ods files with unknown content.</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I><B>calccelladdress.m</B></I></FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>Utility function needed - for jOpenDocument class.</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2><I><B>parsecell.m</B></I></FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>(contained in Excel + data.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><i><b>odsfinfo.m</b></i><br>Explore sheet names and + optionally estimated data size of ods files with unknown content.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><i><b>calccelladdress.m</b></i><br>Utility function needed + for jOpenDocument class.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><i><b>parsecell.m</b></i><br>(contained in Excel xlsread scripts, but works also for ods support) parse raw data - (cell array) into separate numeric array and text (cell) array.)</FONT></FONT><DT> - <BR> - <DT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>spsh_chkrange.m</B></FONT></FONT><DT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>spsh_prstype.m</B></FONT></FONT><DT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>getusedrange.m</B></FONT></FONT><DT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>calccelladdress.m</B></FONT></FONT><DT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>parse_sp_range.m</B></FONT></FONT><DT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>Support files called by - the scripts and not meant for direct invocation by users.</FONT></FONT><DT><P> - <BR> - <DT><P><BR> - <DT><P><BR> -</DL> -<P ALIGN=CENTER><FONT FACE="Arial, sans-serif"><FONT SIZE=4><U><B>REQUIRED -SUPPORT SOFTWARE</B></U></FONT></FONT><DL> - <DL> - <DL> - <DL> - <DL> - <DD><P ALIGN=LEFT> - <BR> - <DD><P ALIGN=LEFT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>For - Windows (MingW):</FONT></FONT></DL> - </DL> - </DL> - </DL> -</DL> -<UL> - <LI><P ALIGN=LEFT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>octave with java package - (>= 1.2.6) with latest svn fixes applied</FONT></FONT></UL> -<DL> - <DT><P><BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>For Linux:</FONT></FONT></DL> -<UL> - <LI><P ALIGN=LEFT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>octave with java package - (>= 1.2.5; earlier versions not tested)</FONT></FONT></UL> -<DL> - <DT><P><BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>For ODS access, + (cell array) into separate numeric array and text (cell) array.)</font></font></p></dt><dt style="font-style: italic;"><font face="Arial, sans-serif"><font size="2"><b>spsh_chkrange.m</b></font></font></dt><dt style="font-style: italic;"> + <font face="Arial, sans-serif"><font size="2"><b>spsh_prstype.m</b></font></font></dt><dt style="font-style: italic;"> + <font face="Arial, sans-serif"><font size="2"><b>getusedrange.m</b></font></font></dt><dt style="font-style: italic;"> + <font face="Arial, sans-serif"><font size="2"><b>calccelladdress.m</b></font></font></dt><dt style="font-style: italic;"> + <font face="Arial, sans-serif"><font size="2"><b>parse_sp_range.m</b></font></font></dt><dt> + <font face="Arial, sans-serif"><font size="2">Support files called by + the scripts and not meant for direct invocation by users.</font></font></dt><dd></dd></dl> +<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>REQUIRED +SUPPORT SOFTWARE</b></u></font></font></p><dl> + <dl> + <dl> + <dl> + <dl> + </dl></dl></dl></dl></dl><font style="font-weight: bold; font-style: italic;" face="Arial, sans-serif"><font size="2">For + Windows (MingW):</font></font><dl><dl><dl><dl> + </dl> + </dl> + </dl> +</dl> +<ul> + <li><p align="left"> + <font face="Arial, sans-serif"><font size="2">octave with java package + (>= 1.2.8)</font></font></p></li></ul> +<dl style="font-style: italic; font-weight: bold;"> + <dt><p><font face="Arial, sans-serif"><font size="2">For Linux:</font></font></p></dt></dl> +<ul> + <li><p align="left"> + <font face="Arial, sans-serif"><font size="2">octave with java package + (>= 1.2.8)</font></font></p></li></ul> + <p><font face="Arial, sans-serif"><font size="2">For ODS access, you'll need to choose at least one of the following java class files - collections:</FONT></FONT></DL> -<UL> - <LI><P ALIGN=LEFT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>(currently the preferred - option) <B>odfdom.jar</B> (<U>only</U> versions <B>0.7.5</B> and - <B>0.8.6</B> work OK!) & <B>xercesImpl.jar</B>. Get them here:</FONT></FONT><LI><P ALIGN=LEFT> - <A HREF="http://odftoolkit.org/projects/odfdom/downloads/directory/previous-versions%252Freleases"><FONT FACE="Arial, sans-serif"><FONT SIZE=2>http://odftoolkit.org/projects/odfdom/downloads/directory/previous-versions%252Freleases</FONT></FONT></A><LI><P LANG="zxx" ALIGN=LEFT> - <FONT COLOR="#000080"><FONT FACE="Arial, sans-serif"><FONT SIZE=2><U>http://odftoolkit.org/projects/odfdom/downloads/directory/current-version</U></FONT></FONT></FONT><LI><P ALIGN=LEFT> - <A HREF="http://xerces.apache.org/mirrors.cgi"><FONT FACE="Arial, sans-serif"><FONT SIZE=2>http://xerces.apache.org/mirrors.cgi</FONT></FONT></A></UL> -<DL> - <DT><P><BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>and/or</FONT></FONT><DT><P> - <BR> -</DL> -<UL> - <LI><P ALIGN=LEFT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>jopendocument</B></FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><version></FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>.jar</B></FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>. - Get it from <A HREF="http://www.jopendocument.org/">http://www.jopendocument.org</A></FONT></FONT><P ALIGN=LEFT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>(jOpenDocument 1.2 - (final) is the most recent one and recommended for Octave)</FONT></FONT></UL> -<DL> - <DT><P><BR> -</DL> -<UL> - <P ALIGN=LEFT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>These</FONT></FONT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>must be referenced with + collections:</font></font></p> +<ul> + <li><p align="left"> + <font face="Arial, sans-serif"><font size="2">(currently the preferred + option) <b>odfdom.jar</b> (<u>only</u> versions <b>0.7.5</b> and + <b>0.8.6</b> work OK!) & <b>xercesImpl.jar</b>. Get them here:</font></font></p></li><li><p align="left"> + <a href="http://odftoolkit.org/projects/odfdom/downloads/directory/previous-versions%252Freleases"><font face="Arial, sans-serif"><font size="2">http://odftoolkit.org/projects/odfdom/downloads/directory/previous-versions%252Freleases</font></font></a></p></li><li><p align="left" lang="zxx"> + <font color="#000080"><font face="Arial, sans-serif"><font size="2"><u>http://odftoolkit.org/projects/odfdom/downloads/directory/current-version</u></font></font></font></p></li><li><p align="left"> + <a href="http://xerces.apache.org/mirrors.cgi"><font face="Arial, sans-serif"><font size="2">http://xerces.apache.org/mirrors.cgi</font></font></a></p></li></ul> +<dl> + <dt><p><br><font face="Arial, sans-serif"><font size="2">and/or</font></font></p></dt></dl> +<ul> + <li><p align="left"><font face="Arial, sans-serif"><font size="2"><b>jopendocument</b></font></font><font face="Arial, sans-serif"><font size="2"><version></font></font><font face="Arial, sans-serif"><font size="2"><b>.jar</b></font></font><font face="Arial, sans-serif"><font size="2">. + Get it from <a href="http://www.jopendocument.org/">http://www.jopendocument.org</a></font></font></p><p align="left"> + <font face="Arial, sans-serif"><font size="2">(jOpenDocument 1.2 + (final) is the most recent one and recommended for Octave)</font></font></p></li></ul><dl><dt><p><font face="Arial, sans-serif"><font size="2">These must be referenced with full pathnames in your javaclasspath. Hint: add it in ./share/octave/<version>/m/startup/octaverc using appropriate - javaaddpath statements.</FONT></FONT></UL> -<DL> - <DT><P><BR> - <DT><P><BR> -</DL> -<P ALIGN=CENTER><FONT FACE="Arial, sans-serif"><FONT SIZE=4><U><B>USAGE</B></U></FONT></FONT><DL> - <DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>(see “help - ods<function_filename>” in octave terminal.)</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>odsread</B></FONT></FONT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>is a sort of analog to - xlsread and works more or less the same. </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>odsread - </B></FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>is a - mere wrapper for the functions </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>odsopen</B></FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>, - </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>ods2oct,</B></FONT></FONT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>and </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>odsclose</B></FONT></FONT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>that do file access and - the actual reading, plus </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>parsecell</B></FONT></FONT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>for post-processing.</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>odswrite</B></FONT></FONT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>works similar to + javaaddpath statements</font></font> + </p></dt><dt><p><br> +</p></dt></dl> +<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>USAGE</b></u></font></font></p> + <p><font face="Arial, sans-serif"><font size="2">(see \x93help + ods<function_filename>\x94 in octave terminal.)</font></font></p><p><font face="Arial, sans-serif"><font size="2"><b>odsread</b></font></font> + <font face="Arial, sans-serif"><font size="2">is a sort of analog to + xlsread and works more or less the same. </font></font><font face="Arial, sans-serif"><font size="2"><b>odsread + </b></font></font><font face="Arial, sans-serif"><font size="2">is a + mere wrapper for the functions </font></font><font face="Arial, sans-serif"><font size="2"><b>odsopen</b></font></font><font face="Arial, sans-serif"><font size="2">, + </font></font><font face="Arial, sans-serif"><font size="2"><b>ods2oct,</b></font></font> + <font face="Arial, sans-serif"><font size="2">and </font></font><font face="Arial, sans-serif"><font size="2"><b>odsclose</b></font></font> + <font face="Arial, sans-serif"><font size="2">that do file access and + the actual reading, plus </font></font><font face="Arial, sans-serif"><font size="2"><b>parsecell</b></font></font> + <font face="Arial, sans-serif"><font size="2">for post-processing.</font></font></p><p><font face="Arial, sans-serif"><font size="2"><b>odswrite</b></font></font> + <font face="Arial, sans-serif"><font size="2">works similar to xlswrite. It too is a wrapper for scripts which do the actual work - and invoke other scripts, a.o. </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>oct2ods</B></FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>.</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>odsfinfo</B></FONT></FONT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>can be used to explore + and invoke other scripts, a.o. </font></font><font face="Arial, sans-serif"><font size="2"><b>oct2ods</b></font></font><font face="Arial, sans-serif"><font size="2">.</font></font></p><p><font face="Arial, sans-serif"><font size="2"><b>odsfinfo</b></font></font> + <font face="Arial, sans-serif"><font size="2">can be used to explore odsfiles with unknown content for sheet names and to get an - impression of the data content sizes.</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>When you need - data from just one sheet, <B>odsread</B> is for you. </FONT></FONT> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>But when you need + impression of the data content sizes.</font></font></p><font face="Arial, sans-serif"><font size="2">When you need + data from just one sheet, <b>odsread</b> is for you.</font></font><font face="Arial, sans-serif"><font size="2"> But when you need data from multiple sheets in the same spreadsheet file, or if you want to process spreadsheet data by limited-size chunks at a time, - <B>odsopen</B> / <B>ods2oct</B> [/<B>parsecell</B>] / … / - <B>odsclose</B> sequences provides for much more speed and + <b>odsopen</b> / <b>ods2oct</b> [/<b>parsecell</b>] / \x85 / + <b>odsclose</b> sequences provides for much more speed and flexibility as the spreadsheet needs to be read just once rather - than repeatedly for each call to <B>odsread</B>.</FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>Same reasoning goes for - <B>odswrite</B>.</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Also, if you use - <B>odsopen</B> / …../, you can process multiple spreadsheets - simultaneously – just use <B>odsopen</B> repeatedly to get - multiple spreadsheet file pointers.</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Moreover, after + than repeatedly for each call to <b>odsread</b>.</font></font><dl><dt><p> + <font face="Arial, sans-serif"><font size="2">Same reasoning goes for + <b>odswrite</b>.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">Also, if you use + <b>odsopen</b> / \x85../, you can process multiple spreadsheets + simultaneously \x96 just use <b>odsopen</b> repeatedly to get + multiple spreadsheet file pointers.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">Moreover, after adding data to an existing spreadsheet file, you can fiddle with the filename in the ods file pointer struct to save the data into - another, possibly new spreadsheet file.</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>If you use - <B>odsopen</B> / <B>ods2oct</B> / … / <B>oct2ods</B> / …. - / <B>odsclose</B>, DO NOT FORGET to invoke <B>odsclose</B> in the + another, possibly new spreadsheet file.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">If you use + <b>odsopen</b> / <b>ods2oct</b> / \x85 / <b>oct2ods</b> / \x85. + / <b>odsclose</b>, DO NOT FORGET to invoke <b>odsclose</b> in the end. The file pointers can contain an enormous amount of data and - may needlessly keep precious memory allocated.</FONT></FONT><DT> - <BR> - <DT><BR> -</DL> -<P ALIGN=CENTER><FONT FACE="Arial, sans-serif"><FONT SIZE=4><U><B>SPREADSHEET -FORMULA SUPPORT</B></U></FONT></FONT><DL> - <DT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2><BR>When using the OTK - interface you can:</FONT></FONT></DL> -<UL> - <LI> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>(When reading, <B>od</B><B>s2oct</B>) + may needlessly keep precious memory allocated.</font></font></p></dt><dt><br> +</dt></dl> +<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>SPREADSHEET +FORMULA SUPPORT</b></u></font></font></p><dl> + <dt> + <font face="Arial, sans-serif"><font size="2">When using the OTK + interface you can:</font></font></dt></dl> +<ul> + <li> + <font face="Arial, sans-serif"><font size="2">(When reading, <b>od</b><b>s2oct</b>) either read spreadsheet formula results, or the literal formula text - strings;</FONT></FONT><LI> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>(When writing, <B>oct2</B><B>od</B><B>s</B>) + strings;</font></font></li><li> + <font face="Arial, sans-serif"><font size="2">(When writing, <b>oct2</b><b>od</b><b>s</b>) either enter formulas in the worksheet as formulas, or enter them as - literal text strings.</FONT></FONT></UL> -<DL> - <DT><BR> - <DT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>In short, you can + literal text strings.</font></font></li></ul> + <font face="Arial, sans-serif"><font size="2">In short, you can enter spreadsheet formulas and in a later stage read them back, - change them and re-enter them in the worksheet.</FONT></FONT><DT> - <BR> - <DT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>The behaviour is - controlled by an option structure </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>options</B></FONT></FONT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>(as last argument to - </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>oct2ods</B></FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>.m - and </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>ods2oct</B></FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>.m) - which for now has only one (logical) field:</FONT></FONT><DT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>options.formulas_as_text</B></FONT></FONT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>= 0 (the default) - implies enter formulas as formulas and read back formula results</FONT></FONT><DT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>options.formulas_as_text - </B></FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>=1 (or + change them and re-enter them in the worksheet.</font></font><font face="Arial, sans-serif"><font size="2"> The behaviour is + controlled by an option structure </font></font><font face="Arial, sans-serif"><font size="2"><b>options</b></font></font> + <font face="Arial, sans-serif"><font size="2">(as last argument to + </font></font><font face="Arial, sans-serif"><font size="2"><b>oct2ods</b></font></font><font face="Arial, sans-serif"><font size="2">.m + and </font></font><font face="Arial, sans-serif"><font size="2"><b>ods2oct</b></font></font><font face="Arial, sans-serif"><font size="2">.m) + which for now has only one (logical) field:</font></font><ul><li> + <font face="Arial, sans-serif"><font size="2"><b>options.formulas_as_text</b></font></font> + <font face="Arial, sans-serif"><font size="2">= 0 (the default) + implies enter formulas as formulas and read back formula results</font></font></li><li> + <font face="Arial, sans-serif"><font size="2"><b>options.formulas_as_text + </b></font></font><font face="Arial, sans-serif"><font size="2">=1 (or any positive integer) means enter formulas as text strings and read - them back as text strings.</FONT></FONT><DT> - <BR> - <DT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Be aware that + them back as text strings.</font></font></li></ul><dl><dt><font face="Arial, sans-serif"><font size="2">Be aware that there's no formula evaluator in ODS java, not even a formula validator. So if you create formulas in your spreadsheet using - </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>oct2ods</B></FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2> - or </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>odswrite</B></FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>, + </font></font><font face="Arial, sans-serif"><font size="2"><b>oct2ods</b></font></font><font face="Arial, sans-serif"><font size="2"> + or </font></font><font face="Arial, sans-serif"><font size="2"><b>odswrite</b></font></font><font face="Arial, sans-serif"><font size="2">, do not expect meaningful results when reading those files later on - </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>unless</B></FONT></FONT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>you open them in - OpenOffice.org Calc and write them back to disk.</FONT></FONT><DT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>You can write all kind + </font></font><font face="Arial, sans-serif"><font size="2"><b>unless</b></font></font> + <font face="Arial, sans-serif"><font size="2">you open them in + OpenOffice.org Calc and write them back to disk.</font></font></dt><dt> + <font face="Arial, sans-serif"><font size="2">You can write all kind of junk as a formula into a spreadsheet cell. There's not much validity checking built into odfdom.jar. I didn't bother to try OpenOffice.org Calc to read such faulty spreadsheets, so I don't know what will happen with spreadsheets containing invalid formulas. But using the above options, you can at least repair them using - octave....</FONT></FONT><DT><P> - <BR> - <DT><P><BR> -</DL> -<P ALIGN=CENTER><FONT FACE="Arial, sans-serif"><FONT SIZE=4><U><B>GOTCHAS</B></U></FONT></FONT><P ALIGN=CENTER> -<BR> -<DL> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>I know of one big + octave....</font></font></dt><dd></dd></dl> +<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>GOTCHAS</b></u></font></font></p><dl> + <dt><p><font face="Arial, sans-serif"><font size="2">I know of one big gotcha: i.e. reading dates (& time). A less obvious one is Java - memory pool allocation size.</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>Date and time - in ODS</B></FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>Octave (as does Matlab) + memory pool allocation size.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><b>Date and time + in ODS</b></font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">Octave (as does Matlab) stores dates as a number representing the number of days since January 1, 0 (and as an aside ignores a.o. Pope Gregorius' - intervention in 1582 when 10 days were simply skipped).</FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>OpenOffice.org stores - dates as text strings like “yyyy-mm-dd”.</FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>MS-Excel stores dates as + intervention in 1582 when 10 days were simply skipped).</font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">OpenOffice.org stores + dates as text strings like \x93yyyy-mm-dd\x94.</font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">MS-Excel stores dates as a number representing the number of days since January 1, 1900 (and - as an aside, erroneously assumes 1900 to be a leap year).</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Now, converting + as an aside, erroneously assumes 1900 to be a leap year).</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">Now, converting OpenOffice.org date cell values (actually, character strings flagged - by “date” attributes) into Octave looks pretty + by \x93date\x94 attributes) into Octave looks pretty straightforward. But when the ODS spreadsheet was originally an Excel spreadsheet converted by OpenOffice.org, the date cells can either be OOo date values (i.e.,strings) OR old numerical values - from the Excel spreadsheet. </FONT></FONT> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>So: you should - carefully check what happens to date cells.</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>As octave has no - ”date” or “time” data type, octave date - values (usually numerical data) are simply transferred as “floats” + from the Excel spreadsheet. </font></font> + </p></dt><dt><p><font face="Arial, sans-serif"><font size="2">So: you should + carefully check what happens to date cells.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">As octave has no + \x94date\x94 or \x93time\x94 data type, octave date + values (usually numerical data) are simply transferred as \x93floats\x94 to ODS spreadsheets. You'll have to convert the values into dates - yourself from within OpenOffice.org.</FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>While adding data and + yourself from within OpenOffice.org.</font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">While adding data and time values has been implemented in the write scripts, the wait is for clever solutions to distinguish dates from floats in octave cell - arrays.</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>Java memory - pool allocation size</B></FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>The Java virtual machine + arrays.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><b>Java memory + pool allocation size</b></font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">The Java virtual machine (JVM) initializes one big chunk of your computer's RAM in which all Java classes and methods etc. are to be loaded: the Java memory - pool. It does this because Java has a very sophisticated “garbage - collection” system. At least on Windows, the initial size is + pool. It does this because Java has a very sophisticated \x93garbage + collection\x94 system. At least on Windows, the initial size is 2MB and the maximum size is 64MB. On Linux this allocated size is much bigger. This part of memory is where the Java-based ODS octave routines (and the Java-based ods routines) live and keep their - variables etc.</FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>For transferring large + variables etc.</font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">For transferring large pieces of information to and from spreadsheets you might hit the limits of this pool. E.g. to be able to handle I/O of an array of - around 50,000 cells I needed a memory pool size of 512 MB.</FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>The memory size can be - increased by inserting a file called “java.opts” + around 50,000 cells I needed a memory pool size of 512 MB.</font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">The memory size can be + increased by inserting a file called \x93java.opts\x94 (without quotes) in the directory ./share/octave/packages/java-<version> (where the script file - javaclasspath.m is located), containing just the following lines:</FONT></FONT><DT><P> - <FONT FACE="Courier New, monospace"><FONT SIZE=2><B>-Xms16m</B></FONT></FONT><DT><P> - <FONT FACE="Courier New, monospace"><FONT SIZE=2><B>-Xmx512m</B></FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>(where 16 = initial + javaclasspath.m is located), containing just the following lines:</font></font></p></dt><dt><p> + <font face="Courier New, monospace"><font size="2"><b>-Xms16m<br>-Xmx512m</b></font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">(where 16 = initial size, 512 = maximum size (in this example), m stands for Megabyte. - This number is system-dependent).</FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>After processing a large + This number is system-dependent).</font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">After processing a large chunk of spreadsheet information you might notice that octave's memory footprint does not shrink so it looks like Java's memory pool does not shrink back; but rest assured, the memory footprint is the - <I>allocated</I> (reserved) memory size, not the actual used size. + <i>allocated</i> (reserved) memory size, not the actual used size. After the JVM has done its garbage collection, only the so-called - “working set” of the memory allocation is really in use + \x93working set\x94 of the memory allocation is really in use and that is a trimmed-down part of the memory allocation pool. On Windows systems it often suffices to minimize the octave terminal - for a few seconds to get a more reasonable memory footprint.</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>Reading cells - containing errors</B></FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>Spreadsheet cells + for a few seconds to get a more reasonable memory footprint.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><b>Reading cells + containing errors</b></font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">Spreadsheet cells containing erroneous stuff are transferred to Octave as NaNs. But not all errors can be catched. Cells showing #Value# in OpenOffice.org Calc often contain invalid formulas but may have a 0 (null) value stored in the value fields. It is impossible to catch this as there is no run-time formula evaluator (yet) in ODF Toolkit - nor jOpenDocument (like there is in Apache POI for Excel).</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Smaller gotcha's - (only with jOpenDocument 1.2b2, <B>fixed</B> in <B>1.2b3+</B> and - <B>1.2 final</B>):</FONT></FONT></DL> -<UL> - <LI><P ALIGN=LEFT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>While reading, empty + nor jOpenDocument (like there is in Apache POI for Excel).</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">Smaller gotcha's + (only with jOpenDocument 1.2b2, <b>fixed</b> in <b>1.2b3+</b> and + <b>1.2 final</b>):</font></font></p></dt></dl> +<ul> + <li><p align="left"> + <font face="Arial, sans-serif"><font size="2">While reading, empty cells are sometimes not skipped but interpreted with numerical value - 0 (zero).</FONT></FONT><LI><P ALIGN=LEFT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>A valid range MUST be + 0 (zero).</font></font></p></li><li><p align="left"> + <font face="Arial, sans-serif"><font size="2">A valid range MUST be specified, I haven't found a way to discover the actual occupied rows and columns (jOpenDocument can give the physical ones (= - capacity) but that doesn't help).</FONT></FONT></UL> -<DL> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>NOT fixed in - version 1.2 final:</FONT></FONT></DL> -<UL> - <LI><P ALIGN=LEFT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>jOpenDocument doesn't + capacity) but that doesn't help).</font></font></p></li></ul> +<dl> + <dt><p><font face="Arial, sans-serif"><font size="2">NOT fixed in + version 1.2 final:</font></font></p></dt></dl> +<ul> + <li><p align="left"> + <font face="Arial, sans-serif"><font size="2">jOpenDocument doesn't set the so-called <office:value-type='string'> attribute in cells containing text; as a consequence ODF Toolkit will treat them - as empty cells. Ooo will read them OK.</FONT></FONT></UL> -<DL> - <DT><P><BR> - <DT><P><BR> -</DL> -<P ALIGN=CENTER><FONT FACE="Arial, sans-serif"><FONT SIZE=4><U><B>MATLAB -COMPATIBILITY</B></U></FONT></FONT><DL> - <DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>AFAIK there's no + as empty cells. Ooo will read them OK.</font></font></p></li></ul> + <p><br> +</p> +<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>MATLAB +COMPATIBILITY</b></u></font></font></p> + <p><font face="Arial, sans-serif"><font size="2">AFAIK there's no similar functionality in Matlab (yet?), only for reading and then - very limited.</FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>o<B>dsread</B> is fairly - function-compatible to <B>xlsread</B>, however.</FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>Same goes for <B>odswrite</B>, - <B>odsfinfo</B> and <B>xlsfinfo</B> – however <B>ods</B><B>f</B><B>info</B> - has better functionality IMO.</FONT></FONT><DT><P> - <BR> - <DT><P><BR> -</DL> -<P ALIGN=CENTER><FONT FACE="Arial, sans-serif"><FONT SIZE=4><U><B>COMPARISON -OF INTERFACES</B></U></FONT></FONT><DL> - <DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>The ODFtoolkit is + very limited.<br>o<b>dsread</b> is fairly + function-compatible to <b>xlsread</b>, however.</font></font></p><p><font face="Arial, sans-serif"><font size="2">Same goes for <b>odswrite</b>, + <b>odsfinfo</b> and <b>xlsfinfo</b> \x96 however <b>ods</b><b>f</b><b>info</b> + has better functionality IMO.</font></font></p><br> +<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>COMPARISON +OF INTERFACES</b></u></font></font></p> + <p><font face="Arial, sans-serif"><font size="2">The ODFtoolkit is the one that gives the best (but slow) results at present. However, parsing xml trees into rectangular arrays is not quite straightforward and the other way round is a real nightmare; odftoolkit up til 0.7.5. did little to hide the gory details for the - developers.</FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>While reading ODS is + developers.</font></font></p><dl><dt><p> + <font face="Arial, sans-serif"><font size="2">While reading ODS is still OK, writing implies checking whether cells already exist explicitly (in table:table-cells) or implicitly (in number-columns-repeated or number-rows-repeated nodes) or not at all yet in which case you'll need to add various types of parent nodes. - Inserting new cells (“nodes”) or deleting nodes implies + Inserting new cells (\x93nodes\x94) or deleting nodes implies rebuilding possibly large parts of the tree in memory - nothing for the faint-of-heart. Only with ODFToolkit (odfdom) 0.8.6 things have - been simplified for developers.</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>The jOpenDocument + been simplified for developers.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">The jOpenDocument interface is the most promising, as it does shield the xml tree details and presents developers something which looks like a - spreadsheet model.</FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>However, unfortunately + spreadsheet model.<br>However, unfortunately the developers decided to shield essential methods by making them 'protected' (e.g. the vital getCellType). JopenDocument does support writing. But OTOH many obvious methods are still lacking and formula - support is absent.</FONT></FONT><DT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>And last (but not least) + support is absent.<br>And last (but not least) the jOpenDocument developers state that their development is primarily driven by requests from customers who pay for support. I do sympathize with this business model but for octave needs this may - hamper progress for a while.</FONT></FONT><DT><P> - <BR> - <DT><BR> -</DL> -<P ALIGN=CENTER><FONT FACE="Arial, sans-serif"><FONT SIZE=4><U><B>TROUBLESHOOTING</B></U></FONT></FONT><P ALIGN=CENTER> -<BR> -<DL> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Some hints for - troubleshooting ODS support are given here. </FONT></FONT> - <DT><P><BR> -</DL> -<OL> - <LI><P ALIGN=LEFT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Check - if </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>J</FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>ava - works. Do a </FONT></FONT><FONT FACE="Courier New, monospace"><FONT SIZE=2>pkg - list </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>and - see</FONT></FONT><P> - a. <FONT FACE="Arial, sans-serif"><FONT SIZE=2>If there's a </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>J</FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>ava - package mentioned (then it's installed). If not, install it.</FONT></FONT></P> - <P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>b. If there's an + hamper progress for a while.</font></font></p></dt><dd></dd></dl> +<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>TROUBLESHOOTING</b></u></font></font></p><dl> + <dt><p><font face="Arial, sans-serif"><font size="2">Some hints for + troubleshooting ODS support are given here. </font></font> + </p></dt></dl> +<ol> + <li><p align="left"><font face="Arial, sans-serif"><font size="2">Check + if </font></font><font face="Arial, sans-serif"><font size="2">J</font></font><font face="Arial, sans-serif"><font size="2">ava + works. Do a </font></font><font face="Courier New, monospace"><font size="2">pkg + list </font></font><font face="Arial, sans-serif"><font size="2">and + see</font></font></p><p> + a. <font face="Arial, sans-serif"><font size="2">If there's a </font></font><font face="Arial, sans-serif"><font size="2">J</font></font><font face="Arial, sans-serif"><font size="2">ava + package mentioned (then it's installed). If not, install it.</font></font></p> + <p><font face="Arial, sans-serif"><font size="2">b. If there's an asterisk on the java package line (then the package is loaded). If - not, do a </FONT></FONT><FONT FACE="Courier New, monospace"><FONT SIZE=2>pkg - rebuild-auto java</FONT></FONT></P> -</OL> -<DL> - <DL> - <DD><P ALIGN=LEFT><BR> - </DL> -</DL> -<OL START=2> - <LI><P ALIGN=LEFT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Check - </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>J</FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>ava - memory settings. Try </FONT></FONT><FONT FACE="Courier New, monospace"><FONT SIZE=2>javamem</FONT></FONT><P> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>a. If it works, check if + not, do a </font></font><font face="Courier New, monospace"><font size="2">pkg + rebuild-auto java</font></font></p> +</li></ol> + +<ol start="2"> + <li><p align="left"><font face="Arial, sans-serif"><font size="2">Check + </font></font><font face="Arial, sans-serif"><font size="2">J</font></font><font face="Arial, sans-serif"><font size="2">ava + memory settings. Try </font></font><font face="Courier New, monospace"><font size="2">javamem</font></font></p><p> + <font face="Arial, sans-serif"><font size="2">a. If it works, check if it reports sufficiently large max memory (had better be 200 MiB, the - bigger the better)</FONT></FONT></P> - <P ALIGN=LEFT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>b. If it - doesn't work, do:</FONT></FONT> - <OL TYPE=a><P ALIGN=LEFT> - <FONT FACE="Courier New, monospace"><FONT SIZE=2>rt = java_invoke - ('java.lang.Runtime', 'getRuntime')</FONT></FONT><P ALIGN=LEFT> - <FONT FACE="Courier New, monospace"><FONT SIZE=2>rt.gc</FONT></FONT><P ALIGN=LEFT> - <FONT FACE="Courier New, monospace"><FONT SIZE=2>rt.maxMemory - ().doubleValue () / 1024 / 1024</FONT></FONT><P ALIGN=LEFT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>The last command will - show MaxMemory in MiB.</FONT></FONT></OL> - <P ALIGN=LEFT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>c. In case - you have insufficient memory, see in “GOTCHAS”, “Java - memory pool allocation size”, how to increase java's memory - pre-reservation.</FONT></FONT><LI><P ALIGN=LEFT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>Check if all classes - (.jarfiles) are in class path. Do a '</FONT></FONT><FONT FACE="Courier New, monospace"><FONT SIZE=2>javaclasspath</FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>' - (under unix/linux, do '</FONT></FONT><FONT FACE="Courier New, monospace"><FONT SIZE=2>tmp - = javaclasspath; strsplit (tmp,”:”)</FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>' - (w/o quotes). See above under “REQUIRED SUPPORT SOFTWARE” - what classes should be mentioned.</FONT></FONT><P ALIGN=LEFT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>If classes (.jar files) - ar</FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>e</FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2> + bigger the better)</font></font></p> + <p align="left"><font face="Arial, sans-serif"><font size="2">b. If it + doesn't work, do:</font></font> + </p><ol type="a"><p align="left"> + <font face="Courier New, monospace"><font size="2">rt = java_invoke + ('java.lang.Runtime', 'getRuntime')</font></font></p><p align="left"> + <font face="Courier New, monospace"><font size="2">rt.gc</font></font></p><p align="left"> + <font face="Courier New, monospace"><font size="2">rt.maxMemory + ().doubleValue () / 1024 / 1024</font></font></p><p align="left"> + <font face="Arial, sans-serif"><font size="2">The last command will + show MaxMemory in MiB.</font></font></p></ol> + <p align="left"><font face="Arial, sans-serif"><font size="2">c. In case + you have insufficient memory, see in \x93GOTCHAS\x94, \x93Java + memory pool allocation size\x94, how to increase java's memory + pre-reservation.</font></font></p></li><li><p align="left"> + <font face="Arial, sans-serif"><font size="2">Check if all classes + (.jarfiles) are in class path. Do a '</font></font><font face="Courier New, monospace"><font size="2">jcp = javaclasspath</font></font><font face="Arial, sans-serif"><font size="2"> (-all)' (under unix/linux, do '</font></font><font face="Courier New, monospace"><font size="2">jcp + = javaclasspath; strsplit (jcp,\x94:\x94)</font></font><font face="Arial, sans-serif"><font size="2">' + (w/o quotes). See above under \x93REQUIRED SUPPORT SOFTWARE\x94 + what classes should be mentioned.</font></font></p><p align="left"> + <font face="Arial, sans-serif"><font size="2">If classes (.jar files) + ar</font></font><font face="Arial, sans-serif"><font size="2">e</font></font><font face="Arial, sans-serif"><font size="2"> missing, download and put them somewhere and add them to the javaclass path with their fully qualified pathname (in quotes) using - </FONT></FONT><FONT FACE="Courier New, monospace"><FONT SIZE=2>javaaddpath()</FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>.</FONT></FONT></OL> -<DL> - <DT><P><BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Once all classes + </font></font><font face="Courier New, monospace"><font size="2">javaaddpath()</font></font><font face="Arial, sans-serif"><font size="2">.</font></font></p></li></ol> + <p><font face="Arial, sans-serif"><font size="2">Once all classes are present and in the javaclasspath, the ods interfaces should just work. The only remaining showstoppers are insufficient write privileges for the working directory, a wrecked up octave or some - other problems outside octave.</FONT></FONT><DT><P> - <BR> -</DL> -<OL START=4> - <LI><P ALIGN=LEFT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Try - opening an ods file: </FONT></FONT> - <P ALIGN=LEFT><FONT FACE="Courier New, monospace"><FONT SIZE=2>ods1 - = odsopen ('test.ods', 1, 'otk')</FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>. + other problems outside octave.</font></font></p> +<ol start="4"> + <li><p align="left"><font face="Arial, sans-serif"><font size="2">Try + opening an ods file: </font></font> + </p><p align="left"><font face="Courier New, monospace"><font size="2">ods1 + = odsopen ('test.ods', 1, 'otk')</font></font><font face="Arial, sans-serif"><font size="2">. If this works and ods1 is a struct with various fields containing - objects, ODF toolkit interface (OTK) works. Do an </FONT></FONT><FONT FACE="Courier New, monospace"><FONT SIZE=2>ods1 - = odsclose (ods1)</FONT></FONT> <FONT FACE="Arial, sans-serif"><FONT SIZE=2>to - close the file.</FONT></FONT><P ALIGN=LEFT> - <FONT FACE="Courier New, monospace"><FONT SIZE=2>ods2 = odsopen - ('test.ods', 1, 'jod')</FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>. + objects, ODF toolkit interface (OTK) works. Do an </font></font><font face="Courier New, monospace"><font size="2">ods1 + = odsclose (ods1)</font></font> <font face="Arial, sans-serif"><font size="2">to + close the file.</font></font></p><p align="left"> + <font face="Courier New, monospace"><font size="2">ods2 = odsopen + ('test.ods', 1, 'jod')</font></font><font face="Arial, sans-serif"><font size="2">. If this works and ods2 is a struct with various fields containing - objects, jOpenDocument interface (JOD) works as well. Do </FONT></FONT><FONT FACE="Courier New, monospace"><FONT SIZE=2>ods2 - = odsclose (ods2)</FONT></FONT> <FONT FACE="Arial, sans-serif"><FONT SIZE=2>to - close the file.</FONT></FONT></OL> -<DL> - <DT><P><BR> - <DT><P><BR> -</DL> -<P ALIGN=CENTER><FONT FACE="Arial, sans-serif"><FONT SIZE=4><U><B>DEVELOPMENT</B></U></FONT></FONT><DL> - <DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>As with the Excel + objects, jOpenDocument interface (JOD) works as well. Do </font></font><font face="Courier New, monospace"><font size="2">ods2 + = odsclose (ods2)</font></font> <font face="Arial, sans-serif"><font size="2">to + close the file.</font></font></p></li></ol> + <p><br> +</p> +<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>DEVELOPMENT</b></u></font></font></p> + <p><font face="Arial, sans-serif"><font size="2">As with the Excel r/w stuff, adding new interfaces should be easy and straightforward. - Add relevant stanzas in <B>odsopen</B>, <B>odsclose, odsfinfo</B> & - <B>getusedrange</B> and add new subfunctions (for the real work) to - <B>getusedrange_</B><INTF>, <B>oct2ods</B> and <B>ods2oct</B>.</FONT></FONT><DT><P> - <BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Suggestions for - future development:</FONT></FONT></DL> -<UL> - <LI><P ALIGN=LEFT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>Reliable and easy ODS - write support (maybe when jOpenDocument is more mature)</FONT></FONT><LI><P ALIGN=LEFT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>Speeding up (ODS is 10 X + Add relevant stanzas in <b>odsopen</b>, <b>odsclose, odsfinfo</b> & + <b>getusedrange</b> and add new subfunctions (for the real work) to + <b>getusedrange_</b><INTF>, <b>oct2ods</b> and <b>ods2oct</b>.</font></font></p><p><font face="Arial, sans-serif"><font size="2">Suggestions for + future development:</font></font></p> + <ul><li><font face="Arial, sans-serif"><font size="2">Reliable and easy ODS + write support (maybe when jOpenDocument is more mature)</font></font></li></ul><ul><li><p align="left"> + <font face="Arial, sans-serif"><font size="2">Speeding up (ODS is 10 X slower than e.g. OOXML !!!). jOpenDocument is much faster but still - immature</FONT></FONT><LI><P ALIGN=LEFT> - “<FONT FACE="Arial, sans-serif"><FONT SIZE=2>Passing function - handle” a la Matlab's </FONT></FONT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>xlsread</B></FONT></FONT><LI><P ALIGN=LEFT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>Adding styles (borders, - cell lay-out, font, etc.)</FONT></FONT></UL> -<DL> - <DT><P><BR> - <DT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Some notes on the - choice for Java:</FONT></FONT></DL> -<OL> - <LI> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>It saves a LOT of + immature</font></font></p></li><li><p align="left"> + \x93<font face="Arial, sans-serif"><font size="2">Passing function + handle\x94 a la Matlab's </font></font><font face="Arial, sans-serif"><font size="2"><b>xlsread</b></font></font></p></li><li><p align="left"> + <font face="Arial, sans-serif"><font size="2">Adding styles (borders, + cell lay-out, font, etc.)</font></font></p></li></ul> + <font face="Arial, sans-serif"><font size="2">Some notes on the + choice for Java:</font></font> +<ol> + <li> + <font face="Arial, sans-serif"><font size="2">It saves a LOT of development time to use ready-baked Java classes rather than developing your own routines and thus effectively reinvent the - wheel.</FONT></FONT><LI> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>A BIG advantage is that - a Java-based solution is platform-independent (“portable”).</FONT></FONT><LI> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>But Java is known to be + wheel.</font></font></li><li> + <font face="Arial, sans-serif"><font size="2">A BIG advantage is that + a Java-based solution is platform-independent (\x93portable\x94).</font></font></li><li> + <font face="Arial, sans-serif"><font size="2">But Java is known to be not very conservative with resources, especially not when processing - XML-based formats.</FONT></FONT></OL> -<DL> - <DT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>So Java is a + XML-based formats.</font></font></li></ol> +<dl> + <dt><font face="Arial, sans-serif"><font size="2">So Java is a compromise between portability and rapid development time versus - capacity (and speed).</FONT></FONT><DT> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>But IMO data sets larger - than 5.10<SUP>5</SUP> cells should not be kept in spreadsheets - anyway. Use real databases for such data sets.</FONT></FONT><DT> - <BR> - <DT><FONT FACE="Arial, sans-serif"><FONT SIZE=2><B>ODFDOM versions</B></FONT></FONT><DT> - <BR> - <DT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>I have tried various + capacity (and speed).</font></font></dt><dt> + <font face="Arial, sans-serif"><font size="2">But IMO data sets larger + than 5.10<sup>5</sup> cells should not be kept in spreadsheets + anyway. Use real databases for such data sets.</font></font></dt><dt> + <br> + </dt><dt><font face="Arial, sans-serif"><font size="2"><b>ODFDOM versions</b></font></font></dt><dt> + <br> + </dt><dt><font face="Arial, sans-serif"><font size="2">I have tried various odfdom version. As to 0.8 & 0.8.5, while the API has been simplified enormously (finally one can address cells by spreadsheet address rather than find out yourself by parsing the table-column/-row/-cell structure), many irrecoverable bugs have - been introduced :-(( </FONT></FONT> - <DT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>In addition - processing ODS files became significantly slower (up to 7 times!).</FONT></FONT><DT> - <BR> - <DT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>End of August 2010 I - have implemented support for odfdom-0.8.6.jar – that version + been introduced :-(( </font></font> + </dt><dt><font face="Arial, sans-serif"><font size="2">In addition + processing ODS files became significantly slower (up to 7 times!).</font></font></dt><dt> + <br> + </dt><dt><font face="Arial, sans-serif"><font size="2">End of August 2010 I + have implemented support for odfdom-0.8.6.jar \x96 that version is at last sufficiently reliable to use. The few remaining bugs and limitations could easily be worked around by diving in the older - TableTable API.</FONT></FONT><DT> - <BR> - <DT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>So at the moment - (November 2010 = last I looked) only odfdom versions <B>0.7.5</B> - and <B>0.8.6</B> are supported.</FONT></FONT><DT> - <BR> - <DT><FONT FACE="Arial, sans-serif"><FONT SIZE=2>If you want to - experiment with odfdom 0.8 & 0.8.5, you can try:</FONT></FONT></DL> -<UL> - <LI> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>odsopen.m (revision - 7157)</FONT></FONT><LI> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>ods2oct.m (revision - 7158)</FONT></FONT><LI> - <FONT FACE="Arial, sans-serif"><FONT SIZE=2>oct2ods.m (revision - 7159)</FONT></FONT></UL> -<DL> - <DT><BR> - <DT><P><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Enjoy!</FONT></FONT><DD> - <BR> - <DD><P ALIGN=CENTER><FONT FACE="Arial, sans-serif"><FONT SIZE=2>Philip - Nienhuis, November 14, 2010</FONT></FONT><DD><P ALIGN=CENTER> - <BR> -</DL> -</BODY> -</HTML> \ No newline at end of file + TableTable API.</font></font></dt><dt> + <font face="Arial, sans-serif"><font size="2">So at the moment + (January 2011 = last I looked) only odfdom versions <b>0.7.5</b> + and <b>0.8.6</b> are supported. Ihaven't tried the odfdom-0.8.7 snapshot.</font></font></dt><dt> + <br> + </dt><dt><font face="Arial, sans-serif"><font size="2">If you want to + experiment with odfdom 0.8 & 0.8.5, you can try:</font></font></dt></dl> +<ul> + <li> + <font face="Arial, sans-serif"><font size="2">odsopen.m (revision + 7157)</font></font></li><li> + <font face="Arial, sans-serif"><font size="2">ods2oct.m (revision + 7158)</font></font></li><li> + <font face="Arial, sans-serif"><font size="2">oct2ods.m (revision + 7159)</font></font></li></ul> + <p><font face="Arial, sans-serif"><font size="2">Enjoy!</font></font></p><p align="center"><font face="Arial, sans-serif"><font size="2">Philip + Nienhuis, February 16, 2011</font></font></p><dl><dd><p align="center"> + <br> +</p></dd></dl> +</body></html> \ No newline at end of file Modified: trunk/octave-forge/main/io/doc/READ-XLS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-XLS.html 2011-02-15 22:02:21 UTC (rev 8119) +++ trunk/octave-forge/main/io/doc/READ-XLS.html 2011-02-16 21:52:20 UTC (rev 8120) @@ -1,591 +1,529 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> -<HTML> -<HEAD> - <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"> - <TITLE></TITLE> - <META NAME="GENERATOR" CONTENT="OpenOffice.org 3.2 (Win32)"> - <META NAME="AUTHOR" CONTENT="Philip Nienhuis"> - <META NAME="CREATED" CONTENT="20091211;17230700"> - <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> - <META NAME="CHANGED" CONTENT="20101114;18083900"> - <META NAME="Info 1" CONTENT=""> - <META NAME="Info 2" CONTENT=""> - <META NAME="Info 3" CONTENT=""> - <META NAME="Info 4" CONTENT=""> - <META NAME="CHANGEDBY" CONTENT="Philip N... [truncated message content] |
From: <prn...@us...> - 2011-04-17 20:43:53
|
Revision: 8217 http://octave.svn.sourceforge.net/octave/?rev=8217&view=rev Author: prnienhuis Date: 2011-04-17 20:43:47 +0000 (Sun, 17 Apr 2011) Log Message: ----------- Spell checks, adapted to (coming) io-1.0.15; description of chk_spreadsheet_support included. Modified Paths: -------------- trunk/octave-forge/main/io/doc/READ-ODS.html trunk/octave-forge/main/io/doc/READ-XLS.html Modified: trunk/octave-forge/main/io/doc/READ-ODS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-ODS.html 2011-04-17 19:50:49 UTC (rev 8216) +++ trunk/octave-forge/main/io/doc/READ-ODS.html 2011-04-17 20:43:47 UTC (rev 8217) @@ -30,7 +30,7 @@ <p align="center"><u><font face="Arial, sans-serif"><font size="4"><b>ODS support for Octave</b></font></font></u></p><p align="center"><font face="Arial, sans-serif"><font size="2">Copyright \xA9 2009 - 2011 Philip Nienhuis <prnienhuis at users.sf.net></font></font></p><p align="center"><font face="Arial, sans-serif"><font size="2">This -version February 16, 2011</font></font></p> +version April 17, 2011</font></font></p> <p><font face="Arial, sans-serif"><font size="2"><i>(ODS = Open Document Format spreadsheet data format, used by e.g., OpenOffice.org.)</i></font></font></p><p><font face="Arial, sans-serif"><font size="2"><i></i></font></font></p><dl><dt><p align="left"><font face="Arial, sans-serif"><font size="2"><u><b>Files @@ -42,15 +42,25 @@ </dl> </dl> </dl> - <dt><p><font face="Arial, sans-serif"><font size="2"><i><b>ods2oct.m</b></i><br>Read raw data from an - ODS spreadsheet file using the file pointer handed by odsopen.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><i><b>oct2ods.m</b></i><br>Write data to an ODS - spreadsheet file using the file pointer handed by odsopen.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><i><b>odsclose.m</b></i><br>Close file handle made - by odsopen and -if data have been transfered to a spreadsheet- save - data.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><i><b>odsfinfo.m</b></i><br>Explore sheet names and - optionally estimated data size of ods files with unknown content.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><i><b>calccelladdress.m</b></i><br>Utility function needed - for jOpenDocument class.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><i><b>parsecell.m</b></i><br>(contained in Excel - xlsread scripts, but works also for ods support) parse raw data - (cell array) into separate numeric array and text (cell) array.)</font></font></p></dt><dt style="font-style: italic;"><font face="Arial, sans-serif"><font size="2"><b>spsh_chkrange.m</b></font></font></dt><dt style="font-style: italic;"> + <dt><p><font face="Arial, sans-serif"><font size="2"><i><b>ods2oct.m</b></i> + <br>Read raw data from an ODS spreadsheet file using the file pointer handed by odsopen.</font></font></p></dt><dt> + <p><font face="Arial, sans-serif"><font size="2"><i><b>oct2ods.m</b></i> + <br>Write data to an ODS spreadsheet file using the file pointer handed by odsopen.</font></font></p></dt><dt> + <p><font face="Arial, sans-serif"><font size="2"><i><b>odsclose.m</b></i> + <br>Close file handle made by odsopen and -if data have been transfered to a spreadsheet- save + data.</font></font></p></dt><dt> + <p><font face="Arial, sans-serif"><font size="2"><i><b>odsfinfo.m</b></i> + <br>Explore sheet names and optionally estimated data size of ods files with unknown content.</font></font></p></dt><dt> + <p><font face="Arial, sans-serif"><font size="2"><i><b>calccelladdress.m</b></i> + <br>Utility function needed for jOpenDocument class.</font></font></p></dt><dt> + <p><font face="Arial, sans-serif"><font size="2"><i><b>parsecell.m</b></i> + <br>(contained in Excel xlsread scripts, but works also for ods support) parse raw data (cell array) into separate numeric array and text (cell) array.)</font></font></p></dt><dt> + <p><font face="Arial, sans-serif"><font size="2"><i><b>chk_spreadsheet_support.m</b></i> + <br>Internal function for (1) checking, (2) setting up, (3) debugging spreadsheet support. While + not specifically meant for direct invocation from the Octave prompt (it + is more useful during initialization of Octave itself) it can be very + helpful when hunting down issues with spreadsheet support in Octave.</font></font></p></dt> + <dt style="font-style: italic;"><font face="Arial, sans-serif"><font size="2"><b>spsh_chkrange.m</b></font></font></dt><dt style="font-style: italic;"> <font face="Arial, sans-serif"><font size="2"><b>spsh_prstype.m</b></font></font></dt><dt style="font-style: italic;"> <font face="Arial, sans-serif"><font size="2"><b>getusedrange.m</b></font></font></dt><dt style="font-style: italic;"> <font face="Arial, sans-serif"><font size="2"><b>calccelladdress.m</b></font></font></dt><dt style="font-style: italic;"> @@ -85,8 +95,8 @@ <ul> <li><p align="left"> <font face="Arial, sans-serif"><font size="2">(currently the preferred - option) <b>odfdom.jar</b> (<u>only</u> versions <b>0.7.5</b> and - <b>0.8.6</b> work OK!) & <b>xercesImpl.jar</b>. Get them here:</font></font></p></li><li><p align="left"> + option) <b>odfdom.jar</b> (<u>only</u> versions <b>0.7.5</b>, + <b>0.8.6</b>, and <b>0.8.7</b> work OK!) & <b>xercesImpl.jar</b>. Get them here:</font></font></p></li><li><p align="left"> <a href="http://odftoolkit.org/projects/odfdom/downloads/directory/previous-versions%252Freleases"><font face="Arial, sans-serif"><font size="2">http://odftoolkit.org/projects/odfdom/downloads/directory/previous-versions%252Freleases</font></font></a></p></li><li><p align="left" lang="zxx"> <font color="#000080"><font face="Arial, sans-serif"><font size="2"><u>http://odftoolkit.org/projects/odfdom/downloads/directory/current-version</u></font></font></font></p></li><li><p align="left"> <a href="http://xerces.apache.org/mirrors.cgi"><font face="Arial, sans-serif"><font size="2">http://xerces.apache.org/mirrors.cgi</font></font></a></p></li></ul> @@ -314,7 +324,11 @@ hamper progress for a while.</font></font></p></dt><dd></dd></dl> <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>TROUBLESHOOTING</b></u></font></font></p><dl> <dt><p><font face="Arial, sans-serif"><font size="2">Some hints for - troubleshooting ODS support are given here. </font></font> + troubleshooting ODS support are given here.<br> + Since April 2011 the function chk_spreadsheet_support() has been included in + the io package. Calling it with arguments ('', 3) (empty string and debug level 3) + will echo a lot of diagnostics to the screen. Large parts of the steps + outlined below have been automated in this script.</font></font> </p></dt></dl> <ol> <li><p align="left"><font face="Arial, sans-serif"><font size="2">Check @@ -435,10 +449,12 @@ have implemented support for odfdom-0.8.6.jar \x96 that version is at last sufficiently reliable to use. The few remaining bugs and limitations could easily be worked around by diving in the older - TableTable API.</font></font></dt><dt> + TableTable API. Later on (early 2011) version 0.8.7 has been tested + too - this needed a few adjustments; clearly the odfdom API (currently at main + version 0) is not stable yet.</font></font></dt><dt> <font face="Arial, sans-serif"><font size="2">So at the moment - (January 2011 = last I looked) only odfdom versions <b>0.7.5</b> - and <b>0.8.6</b> are supported. Ihaven't tried the odfdom-0.8.7 snapshot.</font></font></dt><dt> + (April 2011 = last I looked) only odfdom versions <b>0.7.5</b>, + <b>0.8.6</b> and <b>0.8.7</b> are supported.</font></font></dt><dt> <br> </dt><dt><font face="Arial, sans-serif"><font size="2">If you want to experiment with odfdom 0.8 & 0.8.5, you can try:</font></font></dt></dl> @@ -451,7 +467,7 @@ <font face="Arial, sans-serif"><font size="2">oct2ods.m (revision 7159)</font></font></li></ul> <p><font face="Arial, sans-serif"><font size="2">Enjoy!</font></font></p><p align="center"><font face="Arial, sans-serif"><font size="2">Philip - Nienhuis, February 16, 2011</font></font></p><dl><dd><p align="center"> + Nienhuis, April 17, 2011</font></font></p><dl><dd><p align="center"> <br> </p></dd></dl> </body></html> \ No newline at end of file Modified: trunk/octave-forge/main/io/doc/READ-XLS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-XLS.html 2011-04-17 19:50:49 UTC (rev 8216) +++ trunk/octave-forge/main/io/doc/READ-XLS.html 2011-04-17 20:43:47 UTC (rev 8217) @@ -17,27 +17,33 @@ <p align="center"><font face="Arial, sans-serif"><font size="2">README for Excel spreadsheet file r/w access scripts for octave (> 3.4.0)<br><br>Copyright (C) 2009 - 2011 Philip Nienhuis <prnienhuis -at users.sf.net><br><br>This version February 16, 2011</font></font></p><dl> +at users.sf.net><br><br>This version April 17, 2011</font></font></p><dl> <dt><p><br> </p></dt></dl> <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>EXCEL .XLS SUPPORT FILES</b></u></font></font></p><dl> <dt><p> - <font face="Arial, sans-serif"><font size="2"><br><b style="font-style: italic;">doc/README-XLS.html</b><br>This file.</font></font><br></p></dt><dt><font face="Arial, sans-serif"><font size="2"></font></font><dt style="font-style: italic;"><font face="Arial, sans-serif"><font size="2"><b>xlsread.m</b></font></font></dt><dt> + <font face="Arial, sans-serif"><font size="2"> + <br><b style="font-style: italic;">doc/README-XLS.html</b><br>This file.</font></font> + <br></p></dt><dt><font face="Arial, sans-serif"><font size="2"></font></font><dt style="font-style: italic;"><font face="Arial, sans-serif"><font size="2"><b>xlsread.m</b></font></font></dt><dt> <font face="Arial, sans-serif"><font size="2">All-in-one function for - writing data from one specific worksheet in an Excel spreadsheet file. - This script has Matlab-compatible functionality. <br><br></font></font></dt><font style="font-style: italic;" face="Arial, sans-serif"><font size="2"><b>xlswrite.m</b></font></font></dt><dt> + reading data from one specific worksheet in an Excel spreadsheet file. + This script has Matlab-compatible functionality. + <br><br></font></font></dt><font style="font-style: italic;" face="Arial, sans-serif"><font size="2"><b>xlswrite.m</b></font></font></dt><dt> <font face="Arial, sans-serif"><font size="2">All-in-one function for writing data to one specific worksheet in an Excel spreadsheet file. - This script has Matlab-compatible functionality. <br><br><b style="font-style: italic;">xlsfinfo.m</b></font></font></dt><dt> + This script has Matlab-compatible functionality. + <br><br><b style="font-style: italic;">xlsfinfo.m</b></font></font></dt><dt> <font face="Arial, sans-serif"><font size="2">All-in-one function for exploring basic properties of an Excel spreadsheet file. This script - has Matlab-compatible functionality.<br><br><b style="font-style: italic;">xlsopen.m</b></font></font></dt><dt> + has Matlab-compatible functionality. + <br><br><b style="font-style: italic;">xlsopen.m</b></font></font></dt><dt> <font face="Arial, sans-serif"><font size="2">Function for "opening" (= providing a handle to) an Excel spreadsheet file ("workbook"). This function sorts out which interface to use for .xls access - (i.e.,COM; Java & Apache POI; JexcelAPI; etc.), but it's choice - can be overridden.<br><br><b style="font-style: italic;">xls2oct.m</b></font></font></dt><dt> + (i.e.,COM; Java & Apache POI; JexcelAPI; OpenXLS; etc.), but it's choice + can be overridden. + <br><br><b style="font-style: italic;">xls2oct.m</b></font></font></dt><dt> <font face="Arial, sans-serif"><font size="2">Function for reading data from a specific worksheet pointed to in a struct created by xlsopen.m. xls2oct can be called multiple times consecutively using @@ -45,23 +51,32 @@ different ranges and/or worksheets. Data are returned in the form of a 2D heterogeneous cell array that can be parsed by parsecell.m. xls2oct is a mere wrapper for interface-dependent scripts that do - the actual low-level reading .<br><br><b style="font-style: italic;">oct2xls.m</b></font></font></dt><dt> + the actual low-level reading. + <br><br><b style="font-style: italic;">oct2xls.m</b></font></font></dt><dt> <font face="Arial, sans-serif"><font size="2">Function for writing data to a specific worksheet pointed to in a struct created by xlsopen.m. octxls can be called multiple times consecutively using the same pointer struct, each time allowing to write data to different ranges and/or worksheets. oct2xls is a mere wrapper for interface-dependent scripts that do the actual low-level - writing.<br><br><b style="font-style: italic;">xlsclose.m</b></font></font></dt><dt> + writing. + <br><br><b style="font-style: italic;">xlsclose.m</b></font></font></dt><dt> <font face="Arial, sans-serif"><font size="2">Function for closing (the handle to) an Excel workbook. When data have been written to the workbook oct2xls will write the workbook to disk. Otherwise, the file pointer is simply closed and possibly used interfaces for Excel access (COM/ActiveX/Excel.exe) will be shut down - properly.<br><br><b style="font-style: italic;">parsecell.m</b></font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">Function for separating - the data in raw arrays returned by xls2oct, into numerical/logical - and text (cell) arrays.</font></font></dt><dt> + properly. + <br><br><b style="font-style: italic;">parsecell.m</b></font></font></dt><dt> + <font face="Arial, sans-serif"><font size="2">Function for separating + the data in raw arrays returned by xls2oct, into numerical/logical + and text (cell) arrays. + <br><br><b style="font-style: italic;">chk_spreadsheet_support.m</b></font></font></dt><dt> + <font face="Arial, sans-serif"><font size="2">Internal function for + (1) checking, (2) setting up, (3) debugging spreadsheet support. While + not specifically meant for direct invocation from the Octave prompt (it + is more useful during initialization of Octave itself) it can be very + helpful when hunting down issues with spreadsheet support in Octave.</font></font></dt><dt> <br> </dt><dt style="font-style: italic;"><font face="Arial, sans-serif"><font size="2"><b>spsh_chkrange.m</b></font></font></dt><dt style="font-style: italic;"> <font face="Arial, sans-serif"><font size="2"><b>spsh_prstype.m</b></font></font></dt><dt style="font-style: italic;"> @@ -120,6 +135,14 @@ <font face="Arial, sans-serif"><font size="2">Get it here: <a href="http://sourceforge.net/projects/jexcelapi/files/">http://sourceforge.net/projects/jexcelapi/files/</a></font></font></li></ul> <dl> + <dt><font face="Arial, sans-serif"><font size="2">OpenXLS specific:</font></font></dt></dl> +<ul> + <li> + <font face="Arial, sans-serif"><font size="2">class .jar: <b>jxl.jar</b> + in classpath</font></font></li><li> + <font face="Arial, sans-serif"><font size="2">Get it here: + <a href="http://sourceforge.net/projects/openxls/">http://sourceforge.net/projects/openxls/</a></font></font></li></ul> +<dl> <dt><font face="Arial, sans-serif"><font size="2">Hint: simply put the relevant javaaddpath statements in the .octaverc file.</font></font></dt></dl> <p align="center"><font face="Arial, sans-serif"><font size="2"><br><font size="4"><u><b>USAGE</b></u></font></font></font></p><dl> @@ -304,11 +327,12 @@ (through COM / ActiveX on Windows systems) is probably the most robust and versatile and especially FAST option. There's one gotcha: in case of some type of COM errors Excel will keep running - invisibly; you can only end it through Task Manager.<br>A tiny - problem is that one cannot find out easily through COM what file - types are supported; xls, wks, wk1, xlsx, etc.<br>Another -obvious- - limitation is that COM Excel access only works on Windows systems - where Excel is installed.<br><br>JExcelAPI (Java-based and therefore + invisibly; you can only end it through Task Manager. + <br>A tiny problem is that one cannot find out easily through COM what file + types are supported; xls, wks, wk1, xlsx, etc. + <br>Another -obvious- limitation is that COM Excel access only works on Windows systems + where Excel is installed. + <br><br>JExcelAPI (Java-based and therefore platform-independent) is proven technology but switching between reading and writing is quite involved and memory-hungry when processing large spreadsheets. As the docs state, JExcelAPI is @@ -331,7 +355,8 @@ relies on cached results (i.e. results computed by Excel itself). Depending on Excel settings (\x93Automatic calculation\x94 ON or OFF) this may or may not yield incorrect (or expected) - results.<br><br>Apache POI (Java-based and platform-independent too) + results. + <br><br>Apache POI (Java-based and platform-independent too) is based on the OpenOffice.org I/O Excel r/w routines. It is a more versatile than JExcelAPI, while it doesn't support BIFF5 it does support BIFF8 (Excel 97 \x96 2003) and OOXML (Excel 2007).</font></font></dt><dt> @@ -341,9 +366,15 @@ have been implemented. I've made the relevant subfunction (xls2jpoi2oct) fall back to cached formula results (and yield a suitable warning) for non-implemented Excel functions while reading - Excel files.<br><br>All in all, of the two Java options I'd prefer - Apache POI rather than JexcelAPI. But the latter is indispensable - for BIFF5 formats.</font></font></dt><dt> + Excel files. + <br><br>OpenXLS (an open source version of Extentech's commercial + Java-xls product) is still experimental. It seems to work faster than + JExcelAPI, but it has other issues - i.e., it locks the .xls file and + the unlocking mechanism is a bit wonky. Sometimes xls files keep being + locked until Octave is shut down. + <br><br>All in all, of the three Java options I'd prefer + Apache POI rather than OpenXLS or JexcelAPI. But the latter is + indispensable for BIFF5 formats.</font></font></dt><dt> <br> </dt><dt><font face="Arial, sans-serif"><font size="2">Some notes on the choice for Java:</font></font></dt></dl> @@ -407,7 +438,11 @@ <dt><p><font face="Arial, sans-serif"><font size="2">Some hints for troubleshooting Excel support are contained in this thread:</font></font></p></dt><dt><p><a href="http://sourceforge.net/mailarchive/forum.php?thread_name=4C61B649.9090802%40hccnet.nl&forum_name=octave-dev"><font face="Arial, sans-serif"><font size="2">http://sourceforge.net/mailarchive/forum.php?thread_name=4C61B649.9090802%40hccnet.nl&forum_name=octave-dev</font></font></a></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">dated August 10, 2010.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">A more structured - approach is below:</font></font></p></dt></dl> + approach is below.<br><br> + Since April 2011 a special purpose setup file has been included in the io package + (chk_spreadsheet_support.m). Large parts of the approach below (starting at Step 2) have been automated in this script. + When running it with the second input argument (debug level) set to 3 + a lot of useful diagnostic output will be printed to screen.</font></font></p></dt></dl> <ol> <li><p align="left"><font face="Arial, sans-serif"><font size="2">Check if COM / ActiveXworks (only under Windows OS). Do a </font></font><font face="Courier New, monospace"><font size="2">pkg @@ -525,5 +560,5 @@ function handle" in xlsread.</font></font></li></ul> <font face="Arial, sans-serif"><font size="2">Enjoy!</font></font><dl> <dd><p align="center"><font face="Arial, sans-serif"><font size="2">Philip - Nienhuis, February 16, 2011</font></font></p></dd><dt></dt></dl> + Nienhuis, April 17, 2011</font></font></p></dd><dt></dt></dl> </body></html> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <prn...@us...> - 2011-09-04 20:31:43
|
Revision: 8496 http://octave.svn.sourceforge.net/octave/?rev=8496&view=rev Author: prnienhuis Date: 2011-09-04 20:31:34 +0000 (Sun, 04 Sep 2011) Log Message: ----------- Updated text (UNO) Modified Paths: -------------- trunk/octave-forge/main/io/doc/READ-ODS.html trunk/octave-forge/main/io/doc/READ-XLS.html Modified: trunk/octave-forge/main/io/doc/READ-ODS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-ODS.html 2011-09-04 20:04:09 UTC (rev 8495) +++ trunk/octave-forge/main/io/doc/READ-ODS.html 2011-09-04 20:31:34 UTC (rev 8496) @@ -8,41 +8,37 @@ <meta name="CHANGEDBY" content="Philip Nienhuis"> <meta name="CHANGED" content="20101114;18275600"> <meta name="Info 1" content=""> - <meta name="Info 2" content=""> - <meta name="Info 3" content=""> - <meta name="Info 4" content=""> - <meta name="CHANGEDBY" content="Philip Nienhuis"> - <meta name="CHANGEDBY" content="Philip Nienhuis"> - <meta name="CHANGEDBY" content="Philip Nienhuis"> - <meta name="CHANGEDBY" content="Philip Nienhuis"> - <meta name="CHANGEDBY" content="Philip Nienhuis"> - <meta name="CHANGEDBY" content="Philip Nienhuis"> - <meta name="CHANGEDBY" content="Philip Nienhuis"> - <meta name="CHANGEDBY" content="Philip Nienhuis"> - <meta name="CHANGEDBY" content="Philip Nienhuis"> - <meta name="CHANGEDBY" content="Philip Nienhuis"> - <meta name="CHANGEDBY" content="Philip Nienhuis"> - <meta name="CHANGEDBY" content="Philip Nienhuis"> - <meta name="CHANGEDBY" content="Philip Nienhuis"> <meta name="CHANGEDBY" content="Philip Nienhuis"></head> <body dir="ltr" lang="en-US"> -<p align="center"><u><font face="Arial, sans-serif"><font size="4"><b>ODS -support for Octave</b></font></font></u></p><p align="center"><font face="Arial, sans-serif"><font size="2">Copyright -\xA9 2009 - 2011 Philip Nienhuis <prnienhuis at users.sf.net></font></font></p><p align="center"><font face="Arial, sans-serif"><font size="2">This -version April 17, 2011</font></font></p> - <p><font face="Arial, sans-serif"><font size="2"><i>(ODS = Open - Document Format spreadsheet data format, used by e.g., - OpenOffice.org.)</i></font></font></p><p><font face="Arial, sans-serif"><font size="2"><i></i></font></font></p><dl><dt><p align="left"><font face="Arial, sans-serif"><font size="2"><u><b>Files - content</b></u></font></font></p></dt><dt><p align="left"><font face="Arial, sans-serif"><font size="2"><i><b>odsread.m</b></i><br>No-hassle read script - for reading from an ODS file and parsing the numeric and text data - into separate arrays.<br></font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><i><b>odswrite.m</b></i><br>No-hassle write script - for writing to an ODS file.</font></font></p></dt><dt><font face="Arial, sans-serif"><font size="2"><i><b>odsopen.m</b></i></font></font> </dt><dt><font face="Arial, sans-serif"><font size="2">Get a file pointer - to an ODS spreadsheet file.</font></font></dt><dl><dl><dl> - </dl> - </dl> - </dl> - <dt><p><font face="Arial, sans-serif"><font size="2"><i><b>ods2oct.m</b></i> +<p align="center"><u><font face="Arial, sans-serif"><font size="4"> + <b>ODS support for Octave</b></font></font></u> +</p> +<p align="center"><font face="Arial, sans-serif"><font size="2"> + Copyright \xA9 2009 - 2011 Philip Nienhuis <prnienhuis at users.sf.net></font></font> +</p> + <p align="center"><font face="Arial, sans-serif"><font size="2"> + This version May 28, 2011</font></font> +</p> +<p><font face="Arial, sans-serif"><font size="2"> + <i>(ODS = Open Document Format spreadsheet data format, used by e.g., OpenOffice.org.)</i></font></font> +</p> +<dl><dt> +<p align="left"><font face="Arial, sans-serif"><font size="2"> + <u><b>Files content</b></u></font></font> +</p></dt> +<dt><p align="left"><font face="Arial, sans-serif"><font size="2"> + <i><b>odsread.m</b></i> + <br>No-hassle read script for reading from an ODS file and parsing the numeric + and text data into separate arrays.<br></font></font> +</p></dt> +<dt><p><font face="Arial, sans-serif"><font size="2"> + <i><b>odswrite.m</b></i> + <br>No-hassle write script for writing to an ODS file.</font></font> +</p></dt> + <dt><font face="Arial, sans-serif"><font size="2"><i><b>odsopen.m</b></i></font></font> </dt> + <dt><font face="Arial, sans-serif"><font size="2">Get a file pointer to an ODS spreadsheet file.</font></font></dt> +<dt><p><font face="Arial, sans-serif"><font size="2"><i><b>ods2oct.m</b></i> <br>Read raw data from an ODS spreadsheet file using the file pointer handed by odsopen.</font></font></p></dt><dt> <p><font face="Arial, sans-serif"><font size="2"><i><b>oct2ods.m</b></i> <br>Write data to an ODS spreadsheet file using the file pointer handed by odsopen.</font></font></p></dt><dt> @@ -66,47 +62,62 @@ <font face="Arial, sans-serif"><font size="2"><b>calccelladdress.m</b></font></font></dt><dt style="font-style: italic;"> <font face="Arial, sans-serif"><font size="2"><b>parse_sp_range.m</b></font></font></dt><dt> <font face="Arial, sans-serif"><font size="2">Support files called by - the scripts and not meant for direct invocation by users.</font></font></dt><dd></dd></dl> + the scripts and not meant for direct invocation by users.</font></font></dt><dd></dd> +</dl> <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>REQUIRED SUPPORT SOFTWARE</b></u></font></font></p><dl> - <dl> - <dl> - <dl> - <dl> - </dl></dl></dl></dl></dl><font style="font-weight: bold; font-style: italic;" face="Arial, sans-serif"><font size="2">For - Windows (MingW):</font></font><dl><dl><dl><dl> - </dl> - </dl> - </dl> -</dl> + </dl><font style="font-weight: bold; font-style: italic;" face="Arial, sans-serif"><font size="2">For + Windows (MingW):</font></font> <ul> <li><p align="left"> - <font face="Arial, sans-serif"><font size="2">octave with java package - (>= 1.2.8)</font></font></p></li></ul> + <font face="Arial, sans-serif"><font size="2">Octave with Java package + (preferrably >= 1.2.8, although 1.2.6 will do for most functionality)</font></font></p></li></ul> <dl style="font-style: italic; font-weight: bold;"> <dt><p><font face="Arial, sans-serif"><font size="2">For Linux:</font></font></p></dt></dl> <ul> <li><p align="left"> - <font face="Arial, sans-serif"><font size="2">octave with java package - (>= 1.2.8)</font></font></p></li></ul> + <font face="Arial, sans-serif"><font size="2">Octave with Java package + (preferrably >= 1.2.8, although 1.2.5 will do for most functionality)</font></font></p></li></ul> <p><font face="Arial, sans-serif"><font size="2">For ODS access, you'll need to choose at least one of the following java class files collections:</font></font></p> <ul> - <li><p align="left"> - <font face="Arial, sans-serif"><font size="2">(currently the preferred - option) <b>odfdom.jar</b> (<u>only</u> versions <b>0.7.5</b>, - <b>0.8.6</b>, and <b>0.8.7</b> work OK!) & <b>xercesImpl.jar</b>. Get them here:</font></font></p></li><li><p align="left"> + <li> + <p align="left"><font face="Arial, sans-serif"><font size="2"> + (currently the preferred option) <b>odfdom.jar</b> (<u>only</u> versions <b>0.7.5</b>, + <b>0.8.6</b>, and <b>0.8.7</b> work OK!) & <b>xercesImpl.jar</b>. Get them here: + </font></font></p> + </li><li><p align="left"> <a href="http://odftoolkit.org/projects/odfdom/downloads/directory/previous-versions%252Freleases"><font face="Arial, sans-serif"><font size="2">http://odftoolkit.org/projects/odfdom/downloads/directory/previous-versions%252Freleases</font></font></a></p></li><li><p align="left" lang="zxx"> <font color="#000080"><font face="Arial, sans-serif"><font size="2"><u>http://odftoolkit.org/projects/odfdom/downloads/directory/current-version</u></font></font></font></p></li><li><p align="left"> - <a href="http://xerces.apache.org/mirrors.cgi"><font face="Arial, sans-serif"><font size="2">http://xerces.apache.org/mirrors.cgi</font></font></a></p></li></ul> -<dl> - <dt><p><br><font face="Arial, sans-serif"><font size="2">and/or</font></font></p></dt></dl> + <a href="http://xerces.apache.org/mirrors.cgi"><font face="Arial, sans-serif"><font size="2">http://xerces.apache.org/mirrors.cgi</font></font></a></p></li> +</ul> +<dl><dt><p> + <br><font face="Arial, sans-serif"><font size="2">and/or</font></font> +</p></dt></dl> <ul> - <li><p align="left"><font face="Arial, sans-serif"><font size="2"><b>jopendocument</b></font></font><font face="Arial, sans-serif"><font size="2"><version></font></font><font face="Arial, sans-serif"><font size="2"><b>.jar</b></font></font><font face="Arial, sans-serif"><font size="2">. + <li> + <p align="left"><font face="Arial, sans-serif"><font size="2"><b>jopendocument</b></font></font><font face="Arial, sans-serif"><font size="2"><version></font></font><font face="Arial, sans-serif"><font size="2"><b>.jar</b></font></font><font face="Arial, sans-serif"><font size="2">. Get it from <a href="http://www.jopendocument.org/">http://www.jopendocument.org</a></font></font></p><p align="left"> - <font face="Arial, sans-serif"><font size="2">(jOpenDocument 1.2 - (final) is the most recent one and recommended for Octave)</font></font></p></li></ul><dl><dt><p><font face="Arial, sans-serif"><font size="2">These must be referenced with + <font face="Arial, sans-serif"><font size="2">(jOpenDocument 1.2 (final) is the most recent one and recommended for Octave)</font></font> + </p> + </li> +</ul> +<dl><dt><p> + <br><font face="Arial, sans-serif"><font size="2">and/or</font></font> +</p></dt></dl> +<ul> + <li> + <p align="left"><font face="Arial, sans-serif"><font size="2"><b>OpenOffice.org</b> (or clones like <b>LibreOffice</b>, <b>Go-Office</b>, ...)</font></font></font></font><font face="Arial, sans-serif"><font size="2">. + Get it from <a href="http://www.openoffice.org/">http://www.openoffice.org</a>. The relevant Java class libs are <b>unoil.jar</b>, + <b>unoloader.jar</b>, <b>jurt.jar</b>, <b>juh.jar</b> and <b>ridl.jar</b> (which are scattered around the OOo installation directory), while also the <b><OOo>/program/</b> + directory needs to be in the classpath.</font></font></p> + <p align="left"> + </p> + </li> +</ul> + <dl><dt> + <p><font face="Arial, sans-serif"><font size="2">These must be referenced with full pathnames in your javaclasspath. Hint: add it in ./share/octave/<version>/m/startup/octaverc using appropriate javaaddpath statements</font></font> @@ -146,14 +157,16 @@ filename in the ods file pointer struct to save the data into another, possibly new spreadsheet file.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">If you use <b>odsopen</b> / <b>ods2oct</b> / \x85 / <b>oct2ods</b> / \x85. - / <b>odsclose</b>, DO NOT FORGET to invoke <b>odsclose</b> in the + / <b>odsclose</b>, <b><u><i>DO NOT FORGET</i></u></b> to invoke <b>odsclose</b> in the end. The file pointers can contain an enormous amount of data and - may needlessly keep precious memory allocated.</font></font></p></dt><dt><br> + may needlessly keep precious memory allocated. In case of the UNO interface, the + hidden OpenOffice.org invocation (soffice.bin) can even block proper closing of + Octave.</font></font></p></dt><dt><br> </dt></dl> <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>SPREADSHEET FORMULA SUPPORT</b></u></font></font></p><dl> <dt> - <font face="Arial, sans-serif"><font size="2">When using the OTK + <font face="Arial, sans-serif"><font size="2">When using the OTK or UNO interface you can:</font></font></dt></dl> <ul> <li> @@ -192,7 +205,11 @@ OpenOffice.org Calc to read such faulty spreadsheets, so I don't know what will happen with spreadsheets containing invalid formulas. But using the above options, you can at least repair them using - octave....</font></font></dt><dd></dd></dl> + octave....<br> + The only exception is if you select the UNO interface, as that invokes + OpenOffice.org behind the scenes, and OOo obviously has a validator and + evaluator built-in.</font></font></dt><dd></dd></dl> + <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>GOTCHAS</b></u></font></font></p><dl> <dt><p><font face="Arial, sans-serif"><font size="2">I know of one big gotcha: i.e. reading dates (& time). A less obvious one is Java @@ -293,7 +310,8 @@ very limited.<br>o<b>dsread</b> is fairly function-compatible to <b>xlsread</b>, however.</font></font></p><p><font face="Arial, sans-serif"><font size="2">Same goes for <b>odswrite</b>, <b>odsfinfo</b> and <b>xlsfinfo</b> \x96 however <b>ods</b><b>f</b><b>info</b> - has better functionality IMO.</font></font></p><br> + has better functionality IMO.</font></font></p><br> + <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>COMPARISON OF INTERFACES</b></u></font></font></p> <p><font face="Arial, sans-serif"><font size="2">The ODFtoolkit is @@ -309,9 +327,10 @@ yet in which case you'll need to add various types of parent nodes. Inserting new cells (\x93nodes\x94) or deleting nodes implies rebuilding possibly large parts of the tree in memory - nothing for - the faint-of-heart. Only with ODFToolkit (odfdom) 0.8.6 things have - been simplified for developers.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">The jOpenDocument - interface is the most promising, as it does shield the xml tree + the faint-of-heart. Only with ODFToolkit (odfdom) 0.8.6 and 0.8.7 things have + been simplified for developers.</font></font></p></dt> +<dt><p><font face="Arial, sans-serif"><font size="2">The jOpenDocument + interface is more promising, as it does shield the xml tree details and presents developers something which looks like a spreadsheet model.<br>However, unfortunately the developers decided to shield essential methods by making them @@ -321,14 +340,47 @@ the jOpenDocument developers state that their development is primarily driven by requests from customers who pay for support. I do sympathize with this business model but for octave needs this may - hamper progress for a while.</font></font></p></dt><dd></dd></dl> + hamper progress for a while.</font></font></p></dt> +<dt><p><font face="Arial, sans-serif"><font size="2">The (still experimental) + UNO interface, based on a Java/UNO bridge linking a hidden OpenOffice.org + invocation to Octave, is the most promising: + </font></font> + <ul><li><font face="Arial, sans-serif"><font size="2"> + Admittedly OOo needs some tens of seconds to start for the first time, + but once OOo is in the operating system's disk cache, it operates much + faster than ODF or JOD; + </font></font></li> + <li><font face="Arial, sans-serif"><font size="2"> + It has built-in formula validator and evaluator; + </font></font></li> + <li><font face="Arial, sans-serif"><font size="2"> + It has a much more reliable data parser; + <li><font face="Arial, sans-serif"><font size="2"> + It can read much more spreadsheet formats than just ODS; .sxc (older OOo and + StarOffice), but also .xls, .xlsx (Excel), .wk1 (Lotus 123), dbf, etc. + </font></font></li> + </font></font></li> + <li><font face="Arial, sans-serif"><font size="2"> + It consumes only a fraction of the JVM heap memory that the other Java ODS + spreadsheet solutions need because OOo reads the spreadsheet in its own memory + chunk in RAM. The other solutions read, expand, parse and manipulate + all data in the JVM. In addition, OOo's code is outside the JVM (and + Octave) while the ODF Toolkit and jOpenDocument classes also reside in the + JVM. + </font></font></li></ul> +</p></dt> +</dl> + <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>TROUBLESHOOTING</b></u></font></font></p><dl> <dt><p><font face="Arial, sans-serif"><font size="2">Some hints for troubleshooting ODS support are given here.<br> Since April 2011 the function chk_spreadsheet_support() has been included in the io package. Calling it with arguments ('', 3) (empty string and debug level 3) will echo a lot of diagnostics to the screen. Large parts of the steps - outlined below have been automated in this script.</font></font> + outlined below have been automated in this script.<br> + Problems with UNO are too complicated to treat them here; most of the troubleshooting has been + implemented in chk_spreadsheet_support.m, only some general guidelines are + given below.</font></font> </p></dt></dl> <ol> <li><p align="left"><font face="Arial, sans-serif"><font size="2">Check @@ -364,13 +416,13 @@ <p align="left"><font face="Arial, sans-serif"><font size="2">c. In case you have insufficient memory, see in \x93GOTCHAS\x94, \x93Java memory pool allocation size\x94, how to increase java's memory - pre-reservation.</font></font></p></li><li><p align="left"> - <font face="Arial, sans-serif"><font size="2">Check if all classes + pre-reservation.</font></font></p></li> + <li><p align="left"><font face="Arial, sans-serif"><font size="2">Check if all classes (.jarfiles) are in class path. Do a '</font></font><font face="Courier New, monospace"><font size="2">jcp = javaclasspath</font></font><font face="Arial, sans-serif"><font size="2"> (-all)' (under unix/linux, do '</font></font><font face="Courier New, monospace"><font size="2">jcp = javaclasspath; strsplit (jcp,\x94:\x94)</font></font><font face="Arial, sans-serif"><font size="2">' (w/o quotes). See above under \x93REQUIRED SUPPORT SOFTWARE\x94 - what classes should be mentioned.</font></font></p><p align="left"> - <font face="Arial, sans-serif"><font size="2">If classes (.jar files) + what classes should be mentioned.</font></font></p> + <p align="left"><font face="Arial, sans-serif"><font size="2">If classes (.jar files) ar</font></font><font face="Arial, sans-serif"><font size="2">e</font></font><font face="Arial, sans-serif"><font size="2"> missing, download and put them somewhere and add them to the javaclass path with their fully qualified pathname (in quotes) using @@ -394,8 +446,24 @@ If this works and ods2 is a struct with various fields containing objects, jOpenDocument interface (JOD) works as well. Do </font></font><font face="Courier New, monospace"><font size="2">ods2 = odsclose (ods2)</font></font> <font face="Arial, sans-serif"><font size="2">to - close the file.</font></font></p></li></ol> - <p><br> + close the file.</font></font></p></li> + + <li><p align="left"><font face="Arial, sans-serif"><font size="2">For the UNO + interface, at least version 1.2.8 of the Java package is needed plus the following + Java class libs (jars) and directory:<br> + * <b>unoil.jar</b> (usually found in subdirectory Basis<version>/program/classes/ + or the like of the OpenOffice.org (<OOo>) installation directory;<br> + * <b>juh.jar</b>, <b>jurt.jar</b>, <b>unoloader.jar</b> and <b>ridl.jar</b>, usually + found in the subdirectory URE/share/java/ (or the like) of OOo's installation directory;<br> + * The subdirectory <b>program/</b> (where soffice[.exe] (or ooffice) resides).<br> + The exact case (URE or ure, Basis or basis), name ("Basis3.2" or just "basis") and + subdirectory tree (URE/java or URE/share/java) varies across OOo versions and -clones, + so chk_spreadsheet_support.m can have a hard time finding all needed classes. In + particularly bad cases, when chk_spreadsheet_support cannot find them, you might need + to add one or more of these these classes manually to the javaclasspath. + </font></font></font></p></li> +</ol> +<p><br> </p> <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>DEVELOPMENT</b></u></font></font></p> <p><font face="Arial, sans-serif"><font size="2">As with the Excel @@ -408,7 +476,14 @@ write support (maybe when jOpenDocument is more mature)</font></font></li></ul><ul><li><p align="left"> <font face="Arial, sans-serif"><font size="2">Speeding up (ODS is 10 X slower than e.g. OOXML !!!). jOpenDocument is much faster but still - immature</font></font></p></li><li><p align="left"> + immature.<br> + UNO *is* MUCH faster than jOpenDocument but starting up OpenOffice.org + for the first time can take tens of seconds...<br> + Note that UNO is still experimental. The issue is that odsclose() will simply + kill ALL other OpenOffice.org invocations, also those that were not opened + through Octave! This is related to UNO-Java limitations. A way out is in + development stage. + </font></font></p></li><li><p align="left"> \x93<font face="Arial, sans-serif"><font size="2">Passing function handle\x94 a la Matlab's </font></font><font face="Arial, sans-serif"><font size="2"><b>xlsread</b></font></font></p></li><li><p align="left"> <font face="Arial, sans-serif"><font size="2">Adding styles (borders, @@ -453,7 +528,7 @@ too - this needed a few adjustments; clearly the odfdom API (currently at main version 0) is not stable yet.</font></font></dt><dt> <font face="Arial, sans-serif"><font size="2">So at the moment - (April 2011 = last I looked) only odfdom versions <b>0.7.5</b>, + (May 2011 = last I looked) only odfdom versions <b>0.7.5</b>, <b>0.8.6</b> and <b>0.8.7</b> are supported.</font></font></dt><dt> <br> </dt><dt><font face="Arial, sans-serif"><font size="2">If you want to @@ -467,7 +542,7 @@ <font face="Arial, sans-serif"><font size="2">oct2ods.m (revision 7159)</font></font></li></ul> <p><font face="Arial, sans-serif"><font size="2">Enjoy!</font></font></p><p align="center"><font face="Arial, sans-serif"><font size="2">Philip - Nienhuis, April 17, 2011</font></font></p><dl><dd><p align="center"> + Nienhuis, May 28, 2011</font></font></p><dl><dd><p align="center"> <br> </p></dd></dl> </body></html> \ No newline at end of file Modified: trunk/octave-forge/main/io/doc/READ-XLS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-XLS.html 2011-09-04 20:04:09 UTC (rev 8495) +++ trunk/octave-forge/main/io/doc/READ-XLS.html 2011-09-04 20:31:34 UTC (rev 8496) @@ -1,564 +1,326 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> -<html><head> - <meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252"> - - <title></title><meta name="GENERATOR" content="OpenOffice.org 3.2 (Win32)"> - <meta name="AUTHOR" content="Philip Nienhuis"> - <meta name="CREATED" content="20091211;17230700"> - <meta name="CHANGEDBY" content="Philip Nienhuis"> - <meta name="CHANGED" content="20101114;18083900"> - <meta name="Info 1" content=""> - <meta name="Info 2" content=""> - <meta name="Info 3" content=""> - <meta name="Info 4" content=""> - <meta name="CHANGEDBY" content="Philip Nienhuis"></head> +<HTML> +<HEAD> +<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"> +<META NAME="Generator" CONTENT="Microsoft Word 97"> +<META NAME="CREATED" CONTENT="20091211;17230700"> +<META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> +<META NAME="CHANGED" CONTENT="20101114;18083900"> +</HEAD> +<BODY LINK="#0000ff" VLINK="#800080"> -<body dir="ltr" lang="en-US"> -<p align="center"><font face="Arial, sans-serif"><font size="2">README -for Excel spreadsheet file r/w access scripts for octave (> -3.4.0)<br><br>Copyright (C) 2009 - 2011 Philip Nienhuis <prnienhuis -at users.sf.net><br><br>This version April 17, 2011</font></font></p><dl> - <dt><p><br> -</p></dt></dl> -<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>EXCEL -.XLS SUPPORT FILES</b></u></font></font></p><dl> - <dt><p> - <font face="Arial, sans-serif"><font size="2"> - <br><b style="font-style: italic;">doc/README-XLS.html</b><br>This file.</font></font> - <br></p></dt><dt><font face="Arial, sans-serif"><font size="2"></font></font><dt style="font-style: italic;"><font face="Arial, sans-serif"><font size="2"><b>xlsread.m</b></font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">All-in-one function for - reading data from one specific worksheet in an Excel spreadsheet file. - This script has Matlab-compatible functionality. - <br><br></font></font></dt><font style="font-style: italic;" face="Arial, sans-serif"><font size="2"><b>xlswrite.m</b></font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">All-in-one function for - writing data to one specific worksheet in an Excel spreadsheet file. - This script has Matlab-compatible functionality. - <br><br><b style="font-style: italic;">xlsfinfo.m</b></font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">All-in-one function for - exploring basic properties of an Excel spreadsheet file. This script - has Matlab-compatible functionality. - <br><br><b style="font-style: italic;">xlsopen.m</b></font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">Function for "opening" - (= providing a handle to) an Excel spreadsheet file ("workbook"). - This function sorts out which interface to use for .xls access - (i.e.,COM; Java & Apache POI; JexcelAPI; OpenXLS; etc.), but it's choice - can be overridden. - <br><br><b style="font-style: italic;">xls2oct.m</b></font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">Function for reading - data from a specific worksheet pointed to in a struct created by - xlsopen.m. xls2oct can be called multiple times consecutively using - the same pointer struct, each time allowing to read data from - different ranges and/or worksheets. Data are returned in the form of - a 2D heterogeneous cell array that can be parsed by parsecell.m. - xls2oct is a mere wrapper for interface-dependent scripts that do - the actual low-level reading. - <br><br><b style="font-style: italic;">oct2xls.m</b></font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">Function for writing - data to a specific worksheet pointed to in a struct created by - xlsopen.m. octxls can be called multiple times consecutively using - the same pointer struct, each time allowing to write data to - different ranges and/or worksheets. oct2xls is a mere wrapper for - interface-dependent scripts that do the actual low-level - writing. - <br><br><b style="font-style: italic;">xlsclose.m</b></font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">Function for closing - (the handle to) an Excel workbook. When data have been written to - the workbook oct2xls will write the workbook to disk. Otherwise, the - file pointer is simply closed and possibly used interfaces for Excel - access (COM/ActiveX/Excel.exe) will be shut down - properly. - <br><br><b style="font-style: italic;">parsecell.m</b></font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">Function for separating - the data in raw arrays returned by xls2oct, into numerical/logical - and text (cell) arrays. - <br><br><b style="font-style: italic;">chk_spreadsheet_support.m</b></font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">Internal function for - (1) checking, (2) setting up, (3) debugging spreadsheet support. While - not specifically meant for direct invocation from the Octave prompt (it - is more useful during initialization of Octave itself) it can be very - helpful when hunting down issues with spreadsheet support in Octave.</font></font></dt><dt> - <br> - </dt><dt style="font-style: italic;"><font face="Arial, sans-serif"><font size="2"><b>spsh_chkrange.m</b></font></font></dt><dt style="font-style: italic;"> - <font face="Arial, sans-serif"><font size="2"><b>spsh_prstype.m</b></font></font></dt><dt style="font-style: italic;"> - <font face="Arial, sans-serif"><font size="2"><b>getusedrange.m</b></font></font></dt><dt style="font-style: italic;"> - <font face="Arial, sans-serif"><font size="2"><b>calccelladdress.m</b></font></font></dt><dt style="font-style: italic;"> - <font face="Arial, sans-serif"><font size="2"><b>parse_sp_range.m</b></font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">Support files called by - the scripts and not meant for direct invocation by users.</font></font></dt></dl> -<p align="center"><font face="Arial, sans-serif"><font size="2"><br><font size="4"><u><b>REQUIRED -SUPPORT SOFTWARE</b></u></font></font></font></p><dl> - <dt> - <font face="Arial, sans-serif"><font size="2"><br>For the Excel/COM - interface:</font></font></dt></dl> -<ul> - <li> - <font face="Arial, sans-serif"><font size="2">A windows computer with - Excel installed</font></font></li><li> - <font face="Arial, sans-serif"><font size="2">Octave-forge - Windows-1.0.8 or later package WITH LATEST SVN PATCHES APPLIED</font></font></li></ul> - <font face="Arial, sans-serif"><font size="2">For the Java / - Apache POI / JExcelAPI interfaces (general):</font></font> -<ul> - <li> - <font face="Arial, sans-serif"><font size="2">octave-forge java-1.2.8 - package or later version on Linux</font></font></li><li> - <font face="Arial, sans-serif"><font size="2">octave-forge java-1.2.8 - with latest svn fixes on Windows/MingW</font></font></li><li> - <font face="Arial, sans-serif"><font size="2">Java jre or jdk > - 1.6.0 (hasn't been tested with earlier versions)</font></font></li></ul> -<dl> - <dt><font face="Arial, sans-serif"><font size="2">Apache POI specific:</font></font></dt></dl> -<ul> - <li> - <font face="Arial, sans-serif"><font size="2">class .jars: - <b>poi-3.5-FINAL-<date>.jar</b> & - <b>poi-ooxml-3.5-FINAL-<date>.jar</b> (or later versions) in - classpath</font></font></li><li> - <font face="Arial, sans-serif"><font size="2">Get it here: - <a href="http://poi.apache.org/download.html">http://poi.apache.org/download.html</a></font></font><p> - <font face="Arial, sans-serif"><font size="2">and here:</font></font></p></li><li> - <font face="Arial, sans-serif"><font size="2">for OOXML support (only - available with Apache POI): </font></font> - <p><font face="Arial, sans-serif"><font size="2"><b>poi-ooxml-schemas-<version>.jar</b>, - <b>xbean.jar</b>, <b>dom4j-1.6.1.jar</b> in javaclasspath. </font></font> - </p><p><font face="Arial, sans-serif"><font size="2">Get them here:</font></font></p><p> - <font face="Arial, sans-serif"><font size="2"><a href="http://poi.apache.org/download.html">http://poi.apache.org/download.html</a> - (\x93xmlbeans\x94 and poi-ooxml-schemas)</font></font></p><p> - <font face="Arial, sans-serif"><font size="2"><a href="http://sourceforge.net/projects/dom4j/files">http://sourceforge.net/projects/dom4j/files</a> - (dom4j-<version>)</font></font></p></li></ul> -<dl> - <dt><font face="Arial, sans-serif"><font size="2">JExcelAPI specific:</font></font></dt></dl> -<ul> - <li> - <font face="Arial, sans-serif"><font size="2">class .jar: <b>jxl.jar</b> - in classpath</font></font></li><li> - <font face="Arial, sans-serif"><font size="2">Get it here: - <a href="http://sourceforge.net/projects/jexcelapi/files/">http://sourceforge.net/projects/jexcelapi/files/</a></font></font></li></ul> -<dl> - <dt><font face="Arial, sans-serif"><font size="2">OpenXLS specific:</font></font></dt></dl> -<ul> - <li> - <font face="Arial, sans-serif"><font size="2">class .jar: <b>jxl.jar</b> - in classpath</font></font></li><li> - <font face="Arial, sans-serif"><font size="2">Get it here: - <a href="http://sourceforge.net/projects/openxls/">http://sourceforge.net/projects/openxls/</a></font></font></li></ul> -<dl> - <dt><font face="Arial, sans-serif"><font size="2">Hint: simply put the - relevant javaaddpath statements in the .octaverc file.</font></font></dt></dl> -<p align="center"><font face="Arial, sans-serif"><font size="2"><br><font size="4"><u><b>USAGE</b></u></font></font></font></p><dl> - <dt> - <font face="Arial, sans-serif"><font size="2"><br><b>xlsread</b> and - <b>xlswrite</b> are mere wrappers for - <b>xlsopen</b>-<b>xls2oct</b>-<b>xlsclose</b>-<b>parsecell</b> and - <b>xlsopen</b>-<b>oct2xls</b>-<b>xlsclose</b> sequences, resp. They - exist for the sake of Matlab compatibility.<br><br><b>xlsfinf</b>o - can be used for finding out what worksheet names exist in the file. - For OOXML files you either need MS-Excel 2007 for Windows (or later - version) installed, and/or the input parameter REQINTF should be - specified with a value of 'poi' (case-insensitive) and -obviously- - the complete POI interface must have been installed.<br><br>Invoking - <b>xlsopen</b>/..../<b>xlsclose</b> directly provides for much more - flexibility, speed, and robustness than <b>xlsread</b> / <b>xlswrite</b>. - Indeed, using the same file handle (pointer struct) you can mix - reading & writing before writing the workbook out to disk using - xlsclose.<br>And: <b>xlsopen </b>/ <b>xlsclose</b> hide the gory - interface details from the user.<br>Currently only .xls files - (BIFF8) can be read/written; using JExcelAPI BIFF5 can be read as - well. For OOXML files either Excel 2007 for Windows (or higher) - and/or the complete Apache POI interface must be installed (and - probably the REQINTF parameter specified with a value of - 'poi').<br><br>When using <b>xlsopen</b>....<b>xlsclose</b> be sure - to keep track of the file handle struct.<br><br>A possible - scenario:<br><br><b>xlh = xlsopen (<excel_filename> , [rw], - [<requested interface>])</b><br><i># Set rw to 1 if you want - to write to a workbook immediately.<br># In that case the check for - file existence is skipped and<br># -if needed- a new workbook - created.<br># If you really want an other interface than - auto-selected<br># by xlsopen you can request that. But xlsopen - still checks<br># proper support for your choice.</i><br><br><i># - Read some data</i><br><b>[ rawarr1, xlh ] = xls2oct (xlh, - <SomeWorksheet>, <Range>)</b><br><i># Be sure to specify - xlh as output argument as xls2oct keeps<br># track of changes and - the need to write the workbook to disk <br># in the xlhstruct. And - the origin range is conveyed through<br># the xlh pointer struct.</i><br><br><i># - Separate data into numeric and text data</i><br><b>[ numarr1, - txtarr1, lim1 ] = parsecell (rawarr1)</b><br><i><br></i># Get more - data from another worksheet in the same workbook<br><b>[ rawarr2, - xlh ] = xls2oct (xlh, <SomeOtherWorksheet>, <Range>)</b><br><b>[ - numarr2, txtarr2, lim2 ] = parsecell (rawarr2)</b><br><br># <... - Analysis and preparation of new data in cell array Newdata....><br><br><i># - Add new data to spreadsheet</i><br><b>xlh = oct2xls (Newdata, xlh, - <AnotherWorksheet>, <Range>)</b><br><br><i># Close the - workbook and write it to disk; then clear the handle</i><br><b>xlh = - xlsclose (xlh)</b><br><b>clear xlh</b></font></font></dt><dt> - <br> - </dt><dt><font face="Arial, sans-serif"><font size="2">When not using the - COM interface, specify a value of 'POI' for parameter REQINTF when - accessing OOXML files in xlsread, xlswrite, xlsopen, xlsfinfo (and - be sure the complete Apache POI interface is installed). If you - haven't got ActiveX installed (i.e., not having MS-Excel under - Windows) specifying 'POI' may not be needed as in such cases Apache - POI is the next default interface.</font></font></dt><dt> - <br> - </dt><dt><font face="Arial, sans-serif"><font size="2">When using JExcelAPI - (JXL), after writing into a worksheet you MUST save the file \x96 - adding data to the same or another worksheet is no more possible - after the first call to oct2xls(). This is a limitation of - JExcelAPI.</font></font></dt><dt> - <br> - </dt><dt><br> -</dt></dl> -<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>SPREADSHEET -FORMULA SUPPORT</b></u></font></font></p><dl> - <dt> - <font face="Arial, sans-serif"><font size="2"><br>When using the POI - and JXL interfaces you can:</font></font></dt></dl> -<ul> - <li> - <font face="Arial, sans-serif"><font size="2">(When reading, xls2oct) - either read spreadsheet formula results (like in COM interface), or - the literal formula text strings;</font></font></li><li> - <font face="Arial, sans-serif"><font size="2">(When writing, oct2xls) - either enter formulas in the worksheet as formulas, or enter them as - literal text strings. The former is also like in COM.</font></font></li></ul> - <font face="Arial, sans-serif"><font size="2">In short, you can - enter spreadsheet formulas and in a later stage read them back, - change them and re-enter them in the worksheet. </font></font><dl><dt><font face="Arial, sans-serif"><font size="2">The behaviour is - controlled by an option structure </font></font><font face="Arial, sans-serif"><font size="2"><b>options</b></font></font> - <font face="Arial, sans-serif"><font size="2">which for now has only - one (logical) field:</font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2"><b>options.formulas_as_text</b></font></font> - <font face="Arial, sans-serif"><font size="2">= 0 (the default) - implies enter formulas as formulas and read back formula results</font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2"><b>options.formulas_as_text - </b></font></font><font face="Arial, sans-serif"><font size="2">=1 (or - any positive integer) means enter formulas as text strings and read - them back as text strings.</font></font></dt><dt><font face="Arial, sans-serif"><font size="2">Be aware that - there's no formula evaluator in JExcelAPI (JXL). So if you create - formulas in your spreadsheet using oct2xls or xlswrite with 'JXL', - do not expect meaningful results when reading those files later on - </font></font><font face="Arial, sans-serif"><font size="2"><b>unless</b></font></font> - <font face="Arial, sans-serif"><font size="2">you open them in Excel - and write them back to disk.</font></font></dt><dt><font face="Arial, sans-serif"><font size="2">While both Apache - POI and JExcelAPI feature a formula validator, not all spreadsheet - functions present in Excel have been implemented (yet).</font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">Worse, older Excel - versions feature less functions than newer versions. So be wary as - this may make for interesting confusion.</font></font><br> - </dt><dt><br> -</dt></dl> -<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>MATLAB -COMPATIBILITY</b></u></font></font></p><dl> - <dt> - <font face="Arial, sans-serif"><font size="2"><br><b>xlsread</b>, - <b>xlswrite</b> and <b>xlsfinfo</b> are for the most part - Matlab-compatible. Some small differences are mentioned below. When - using the Java interfaces octave supplies some formula manipulation - support.<br><br><u><b>xlsread</b></u><br>Matlab's <b>xlsread</b> - supports invoking extra functions while reading ("passing - function handle"); octave not. But this can be simulated - outside <b>xlsread</b>.<br><br>Matlab's <b>xlsread</b> flags some - spreadsheet errors, octave-forge just returns blank - cells.<br><br>Octave-forge returns info about the actual (rather - than the requested) cell range where the data came from. Personally - I find it very useful to know from what part of a worksheet the data - originate so I've put quite some effort in it :-)</font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">Matlab can't, due to - Excel automatically trimming returned arrays from empty outer - columns and rows. Octave is more clever but the Visual Basic call - used for determining the actually used range has some limitations: - (1) it relies on cached range values and thus may be out-of-date, - and (2) it counts empty formatted cells too. When using ActiveX/COM, - if octave's <b>xlsfinfo</b>.m returns wrong data ranges it is most - often an overestimation.</font></font></dt><dt> - <br> - </dt><dt><font face="Arial, sans-serif"><font size="2">Matlab's <b>xlsread</b> - ignores all non-numeric data values outside the smallest rectangle - encompassing all numerical values. Octave's <b>xlsread</b> doesn't. - This means that Matlab ignores all row/column headers, not very - user-friendly IMO. <br><br>When using the Java interface, reading - and writing xls-files by octave-forge is platform-independent. On - systems w/o installed Excel, Matlab can only read Excel 95 formatted - .xls files (written using ML <b>xlswrite</b>'s 'Basic\x94 option) - \x96 and then differently than under Windows.....</font></font></dt><dt> - <br> - </dt><dt><font face="Arial, sans-serif"><font size="2">Matlab's <b>xlsread</b> - returns strings for cells containing date values. This makes for - endless if-then-elseif-else-end constructs to catch all expected - date formates. Octave returns numerical data (where 0 = 1/1/1900 \x96 - you can easily transfer them into proper octave date values yourself - using e.g. datestr(), see bottom of this document for more - info).<br><br>Matlab's <b>xlsread</b> invokes <b>csvread</b> if no - Excel interface is present. Octave-forge's <b>xlsread</b> - doesn't.<br><br><u><b>xlswrite</b></u><br>Octave-forge's <b>xlswrite</b> - works on systems w/o Excel support, Matlab's doesn't (properly).</font></font></dt><dt> - <br> - </dt><dt><font face="Arial, sans-serif"><font size="2">When specifying a - sheet number larger than the number of existing sheets in an .xls - file, Matlab's <b>xlswrite</b> adds empty sheets until the new sheet - number is created; Octave's <b>xlswrite</b> only adds one sheet - called \x93Sheet<number>\x94 where <number> is the - specified sheet number. </font></font> - </dt><dt><font face="Arial, sans-serif"><font size="2">Even better (IMO) - while M's <b>xlswrite</b> always creates Sheet1/Sheet2/Sheet3 when - creating a new spreadsheet, octave's <b>xlswrite</b> only creates - the requested worksheet. (Did you know that you can instruct Excel - to create spreadsheets with just one, or any number of, worksheets? - Look in Tools | Options, General tab.)</font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">Oh and octave doesn't - touch the \x93active sheet\x94 - but that's not automatically - an advantage.</font></font></dt><dt> - <br> - </dt><dt><font face="Arial, sans-serif"><font size="2">If the specified - write range is larger than the actual data array, Matlab's <b>xlswrite</b> - adds #N/A cells to fill up the lowermost rows and rightmost columns; - octave-forge's <b>xlswrite</b> doesn't. <br><br><b>xlsfinfo</b><br>When - invoking Excel/COM interface, octave-forge's <b>xlsfinfo</b> also - echoes the type of sheet (worksheet, chart), not just the sheet - names. Using Java I haven't found similar functionality (yet).</font></font></dt><dt> - <br> - </dt><dt><br> -</dt></dl> -<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>COMPARISON -OF INTERFACES & USAGE</b></u></font></font></p><dl> - <dt> - <br> - </dt><dt><font face="Arial, sans-serif"><font size="2">Using Excel itself - (through COM / ActiveX on Windows systems) is probably the most - robust and versatile and especially FAST option. There's one gotcha: - in case of some type of COM errors Excel will keep running - invisibly; you can only end it through Task Manager. - <br>A tiny problem is that one cannot find out easily through COM what file - types are supported; xls, wks, wk1, xlsx, etc. - <br>Another -obvious- limitation is that COM Excel access only works on Windows systems - where Excel is installed. - <br><br>JExcelAPI (Java-based and therefore - platform-independent) is proven technology but switching between - reading and writing is quite involved and memory-hungry when - processing large spreadsheets. As the docs state, JExcelAPI is - optimized for reading and it does do that well - but still slower - than Excel/COM. The fact that upon a switch from reading to writing - the existing spreadsheet is overwritten <b>in place</b> by a blank - one and that you can only get the contents back wen writing out all - of the changes is worrying - and any change after the first write() - is lost as a next write() doesn't seem to work, worse yet, you may - completely loose the spreadsheet in question. The first is by - JExcelAPI design, the second is probably a bug (in octave-forge/Java - or JExcelAPI ? I don't know). Adding data to existing spreadsheets - does work, but IMO undue user confidence is needed.</font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">JExcelAPI supports BIFF5 - (only reading) and BIFF8 (Excel 95 and Excel 97-2003, respectively). - Upon overwriting, BIFF5 spreadsheets are converted silently to - BIFF8.</font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">JexcelAPI, unlike - ApachePOI, doesn't evaluate functions while reading but instead - relies on cached results (i.e. results computed by Excel itself). - Depending on Excel settings (\x93Automatic calculation\x94 ON - or OFF) this may or may not yield incorrect (or expected) - results. - <br><br>Apache POI (Java-based and platform-independent too) - is based on the OpenOffice.org I/O Excel r/w routines. It is a more - versatile than JExcelAPI, while it doesn't support BIFF5 it does - support BIFF8 (Excel 97 \x96 2003) and OOXML (Excel 2007).</font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">It is slower than native - JXL let alone Excel & COM but it features active formula - evaluation, although at the moment (v. 3.7) not all Excel functions - have been implemented. I've made the relevant subfunction - (xls2jpoi2oct) fall back to cached formula results (and yield a - suitable warning) for non-implemented Excel functions while reading - Excel files. - <br><br>OpenXLS (an open source version of Extentech's commercial - Java-xls product) is still experimental. It seems to work faster than - JExcelAPI, but it has other issues - i.e., it locks the .xls file and - the unlocking mechanism is a bit wonky. Sometimes xls files keep being - locked until Octave is shut down. - <br><br>All in all, of the three Java options I'd prefer - Apache POI rather than OpenXLS or JexcelAPI. But the latter is - indispensable for BIFF5 formats.</font></font></dt><dt> - <br> - </dt><dt><font face="Arial, sans-serif"><font size="2">Some notes on the - choice for Java:</font></font></dt></dl> -<ol> - <li> - <font face="Arial, sans-serif"><font size="2">It saves a LOT of - development time to use ready-baked Java classes rather than - developing your own routines and thus effectively reinvent the - wheel.</font></font></li><li> - <font face="Arial, sans-serif"><font size="2">A BIG advantage is that - a Java-based solution is platform-independent (\x93portable\x94).</font></font></li><li> - <font face="Arial, sans-serif"><font size="2">But Java is known to be - not very conservative with resources, especially not when processing - XML-based formats.</font></font></li></ol> -<dl> - <dt><font face="Arial, sans-serif"><font size="2">So Java is a - compromise between portability and rapid development time versus - capacity (and speed).</font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">But IMO data sets larger - than 5.10<sup>5</sup> cells should not be kept in spreadsheets - anyway. Better use real databases for such data sets.</font></font></dt><dt><br> -</dt></dl> -<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>A -NOTE ON JAVA MEMORY USAGE</b></u></font></font></p> - <p><font face="Arial, sans-serif"><font size="2"><b>Java memory - pool allocation size</b></font></font></p><dl><dt><p> - <font face="Arial, sans-serif"><font size="2">The Java virtual machine - (JVM), when initialized by octave, reserves one big chunk of your - computer's RAM in which all java classes and methods etc. are to be - loaded: the java memory pool. It does this because java has a very - sophisticated \x93garbage collection\x94 system. At least on - Windows, the initial size is 2MB and the maximum size is 16 MB. On - Linux this allocated size might differ (e.g., my Mandriva box with - openJDK has a 512 MB default max setting). This part of memory is - where the Java-based XLS/ODS octave routines live and keep their - variables etc.</font></font></p></dt><dt><p> - <font face="Arial, sans-serif"><font size="2">For transferring large - pieces of information to and from spreadsheets you might hit the - limits of this pool. E.g. to be able to handle I/O of an array of - around 500,000 cells I needed a memory pool size of 512 MB.</font></font></p></dt><dt><p> - <font face="Arial, sans-serif"><font size="2">The memory size can be - increased by inserting a file called \x93java.opts\x94 - (without quotes) in the directory - ./share/octave/packages/java-<version> (where the script file - javaclasspath.m is located), containing just the following lines:</font></font></p></dt><dt><p><font face="Courier New, monospace"><font size="2"><b>-Xms16m<br>-Xmx512m</b></font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">(where 16 = - initial size, 512 = maximum size (in this example), m stands for - Megabyte. This maximum is system-dependent. E.g., I have a 1 GB - setting).</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">After processing - a large chunk of spreadsheet information you might notice that - octave's memory footprint does not shrink so it looks like Java's - memory pool does not shrink back; but rest assured, the memory - footprint is the <i>allocated</i> (reserved) memory size, not the - actual used size. After the JVM has done its garbage collection, - only the so-called \x93working set\x94 of the memory - allocation is really in use and that is a trimmed-down part of the - memory allocation pool. On Windows systems it often suffices to - minimize the octave terminal for a few seconds to get a more - reasonable memory footprint.</font></font></p></dt><dt><br> -</dt></dl> -<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>TROUBLESHOOTING</b></u></font></font></p><dl> - <dt><p><font face="Arial, sans-serif"><font size="2">Some hints for - troubleshooting Excel support are contained in this thread:</font></font></p></dt><dt><p><a href="http://sourceforge.net/mailarchive/forum.php?thread_name=4C61B649.9090802%40hccnet.nl&forum_name=octave-dev"><font face="Arial, sans-serif"><font size="2">http://sourceforge.net/mailarchive/forum.php?thread_name=4C61B649.9090802%40hccnet.nl&forum_name=octave-dev</font></font></a></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">dated August 10, - 2010.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">A more structured - approach is below.<br><br> - Since April 2011 a special purpose setup file has been included in the io package - (chk_spreadsheet_support.m). Large parts of the approach below (starting at Step 2) have been automated in this script. - When running it with the second input argument (debug level) set to 3 - a lot of useful diagnostic output will be printed to screen.</font></font></p></dt></dl> -<ol> - <li><p align="left"><font face="Arial, sans-serif"><font size="2">Check - if COM / ActiveXworks (only under Windows OS). Do a </font></font><font face="Courier New, monospace"><font size="2">pkg - list </font></font><font face="Arial, sans-serif"><font size="2">and - see</font></font></p><p> - a. <font face="Arial, sans-serif"><font size="2">If there's a windows - package mentioned (then it's installed). If not, install it.</font></font></p> - <p align="left"><font face="Arial, sans-serif"><font size="2">b. If - there's an asterisk on the windows package line (then the package is - loaded). If not, do a </font></font><font face="Courier New, monospace"><font size="2">pkg - load windows</font></font> - </p></li><li><p align="left"><font face="Arial, sans-serif"><font size="2">Check - if the ActiveX server works. Do:</font></font></p><p align="left"> - <font face="Courier New, monospace"><font size="2">exl = actxserver - ('Excel.Application')</font></font> <font face="Arial, sans-serif"><font size="2">## - Note the period between \x93Excel\x94 and \x93Application\x94</font></font></p><p align="left"> - <font face="Arial, sans-serif"><font size="2">If a COM object is - returned, ActiveX / COM / Excel works. Do: </font></font><font face="Courier New, monospace"><font size="2">exl.Quit(); - delete (exl)</font></font> <font face="Arial, sans-serif"><font size="2">to - shut down the (hidden) Excel invocation.</font></font></p><p align="left"> - <font face="Arial, sans-serif"><font size="2">If you get an error - message, your last resort is re-installing the windows package, or - trying the Java-based interfaces.</font></font></p></li><li><p align="left"> - <font face="Arial, sans-serif"><font size="2">Check if java works. Do - a </font></font><font face="Courier New, monospace"><font size="2">pkg - list </font></font><font face="Arial, sans-serif"><font size="2">and - see</font></font></p><p> - a. <font face="Arial, sans-serif"><font size="2">If there's a java - package mentioned (then it's installed). If not, install it.</font></font></p> - <p><font face="Arial, sans-serif"><font size="2">b. If there's an - asterisk on the java package line (then the package is loaded). If - not, do a </font></font><font face="Courier New, monospace"><font size="2">pkg - rebuild -auto java</font></font></p> -</li></ol> +<P><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"></P> +<FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><P ALIGN="CENTER">README for Excel spreadsheet file r/w access scripts for octave (> 3.4.0)<BR> +<BR> +Copyright (C) 2009 - 2011 Philip Nienhuis <prnienhuis at users.sf.net><BR> +<BR> +This version September 4, 2011</P> +</FONT></FONT><B><U><FONT FACE="Arial, sans-serif" SIZE=4><FONT FACE="Arial, sans-serif" SIZE=4><P ALIGN="CENTER">EXCEL .XLS SUPPORT FILES</P> +</B></U></FONT></FONT><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DL> +<DT><BR> +<B>doc/README-XLS.html</B><BR> +This file.</FONT></FONT> </DT><BR><BR> +<B><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DT>xlsread.m</DT> +</B><DT>All-in-one function for reading data from one specific worksheet in an Excel spreadsheet file. This script has Matlab-compatible functionality. <BR> +</DT><BR> +<B>xlswrite.m</B> +<DT>All-in-one function for writing data to one specific worksheet in an Excel spreadsheet file. This script has Matlab-compatible functionality.<BR> +<BR> +<B>xlsfinfo.m</B> +<DT>All-in-one function for exploring basic properties of an Excel spreadsheet file. This script has Matlab-compatible functionality. <BR> +<BR> +<B>xlsopen.m</B></DT> +<DT>Function for "opening" (= providing a handle to) an Excel spreadsheet file ("workbook"). This function sorts out which interface to use for .xls access (i.e.,COM; Java & Apache POI; JexcelAPI; OpenXLS; etc.), but it's choice can be overridden. <BR> +<BR> +<B>xls2oct.m</B></DT> +<DT>Function for reading data from a specific worksheet pointed to in a struct created by xlsopen.m. xls2oct can be called multiple times consecutively using the same pointer struct, each time allowing to read data from different ranges and/or worksheets. Data are returned in the form of a 2D heterogeneous cell array that can be parsed by parsecell.m. xls2oct is a mere wrapper for interface-dependent scripts that do the actual low-level reading. <BR> +<BR> +<B>oct2xls.m</B></DT> +<DT>Function for writing data to a specific worksheet pointed to in a struct created by xlsopen.m. octxls can be called multiple times consecutively using the same pointer struct, each time allowing to write data to different ranges and/or worksheets. oct2xls is a mere wrapper for interface-dependent scripts that do the actual low-level writing. <BR> +<BR> +<B>xlsclose.m</B></DT> +<DT>Function for closing (the handle to) an Excel workbook. When data have been written to the workbook oct2xls will write the workbook to disk. Otherwise, the file pointer is simply closed and possibly used interfaces for Excel access (COM/ActiveX/Excel.exe) will be shut down properly. <BR> +<BR> +<B>parsecell.m</B></DT> +<DT>Function for separating the data in raw arrays returned by xls2oct, into numerical/logical and text (cell) arrays. <BR> +<BR> +<B>chk_spreadsheet_support.m</B></DT> +<DT>Internal function for (1) checking, (2) setting up, (3) debugging spreadsheet support. While not specifically meant for direct invocation from the Octave prompt (it is more useful during initialization of Octave itself) it can be very helpful when hunting down issues with spreadsheet support in Octave.</DT> +</DL> +<B>spsh_chkrange.m</B>,</FONT></FONT> <B><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2>spsh_prstype.m</B>,</FONT></FONT> <B><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2>getusedrange.m</B>,</FONT></FONT> <B><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2>calccelladdress.m</B>,</FONT></FONT> <B><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2>parse_sp_range.m +</B> +<DT>Support files called by the scripts and not meant for direct invocation by users.</DT> +<P ALIGN="CENTER"><BR> +</FONT></FONT><B><U><FONT FACE="Arial, sans-serif" SIZE=4><FONT FACE="Arial, sans-serif" SIZE=4>REQUIRED SUPPORT SOFTWARE</P> +</B></U></FONT></FONT><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DL> +<DT><BR> +For the Excel/COM interface:</DT> +</DL> -<ol start="4"> - <li><p align="left"><font face="Arial, sans-serif"><font size="2">Check - </font></font><font face="Arial, sans-serif"><font size="2">J</font></font><font face="Arial, sans-serif"><font size="2">ava - memory settings. Try </font></font><font face="Courier New, monospace"><font size="2">javamem</font></font></p><p> - <font face="Arial, sans-serif"><font size="2">a. If it works, check if - it reports sufficiently large max memory (had better be 200 MiB, the - bigger the better)</font></font></p> - <p align="left"><font face="Arial, sans-serif"><font size="2">b. If it - doesn't work, do:</font></font> - </p><ol type="a"><p align="left"> - <font face="Courier New, monospace"><font size="2">rt = java_invoke - ('java.lang.Runtime', 'getRuntime')<br>rt.gc<br>rt.maxMemory - ().doubleValue () / 1024 / 1024</font></font></p><p align="left"> - <font face="Arial, sans-serif"><font size="2">The last command will - show MaxMemory in MiB.</font></font></p></ol> - <p align="left"><font face="Arial, sans-serif"><font size="2">c. In case - you have insufficient memory, see in \x93GOTCHAS\x94, \x93Java - memory pool allocation size\x94, how to increase java's memory - pre-reservation.</font></font></p></li><li><p align="left"> - <font face="Arial, sans-serif"><font size="2">Check if all classes - (.jarfiles) are in class path. Do a '</font></font><font face="Courier New, monospace"><font size="2">javaclasspath</font></font><font face="Arial, sans-serif"><font size="2">' - (under unix/linux, do '</font></font><font face="Courier New, monospace"><font size="2">tmp - = javaclasspath; strsplit (tmp,\x94:\x94)</font></font><font face="Arial, sans-serif"><font size="2">' - (w/o quotes). See above under \x93REQUIRED SUPPORT SOFTWARE\x94 - what classes should be mentioned.</font></font></p><p align="left"> - <font face="Arial, sans-serif"><font size="2">If classes (.jar files) - are missing, download and put them somewhere and add them to the - javaclass path with their fully qualified pathname (in quotes) using - </font></font><font face="Courier New, monospace"><font size="2">javaaddpath()</font></font><font face="Arial, sans-serif"><font size="2">.</font></font></p></li></ol> - <p><font face="Arial, sans-serif"><font size="2">Once all classes - are present and in the javaclasspath, the xls interfaces should just - work. The only remaining showstoppers are insufficient write - privileges for the working directory, a wrecked up octave or some - other problem outside octave.</font></font></p><ol start="6"> - <li><p align="left"><font face="Arial, sans-serif"><font size="2">Try - opening an xls file: </font></font> - </p><p align="left"><font face="Courier New, monospace"><font size="2">xls1 - = xlsopen ('test.xls', 1, 'poi')</font></font><font face="Arial, sans-serif"><font size="2">. - If this works and xls1 is a struct with various fields containing - objects, the Apache POI interface (POI) works. Do an </font></font><font face="Courier New, monospace"><font size="2">xls1 - = xlsclose (xls1)</font></font> <font face="Arial, sans-serif"><font size="2">to - close the file.</font></font></p><p align="left"> - <font face="Courier New, monospace"><font si... [truncated message content] |
From: <prn...@us...> - 2011-09-21 18:06:47
|
Revision: 8576 http://octave.svn.sourceforge.net/octave/?rev=8576&view=rev Author: prnienhuis Date: 2011-09-21 18:06:41 +0000 (Wed, 21 Sep 2011) Log Message: ----------- Text adapted (layout, some note on UNO limitations) Modified Paths: -------------- trunk/octave-forge/main/io/doc/READ-ODS.html trunk/octave-forge/main/io/doc/READ-XLS.html Modified: trunk/octave-forge/main/io/doc/READ-ODS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-ODS.html 2011-09-21 11:48:47 UTC (rev 8575) +++ trunk/octave-forge/main/io/doc/READ-ODS.html 2011-09-21 18:06:41 UTC (rev 8576) @@ -314,7 +314,7 @@ <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>COMPARISON OF INTERFACES</b></u></font></font></p> - <p><font face="Arial, sans-serif"><font size="2">The ODFtoolkit is + <p><font face="Arial, sans-serif"><font size="2">The <b>ODFtoolkit</b> is the one that gives the best (but slow) results at present. However, parsing xml trees into rectangular arrays is not quite straightforward and the other way round is a real nightmare; @@ -329,7 +329,7 @@ rebuilding possibly large parts of the tree in memory - nothing for the faint-of-heart. Only with ODFToolkit (odfdom) 0.8.6 and 0.8.7 things have been simplified for developers.</font></font></p></dt> -<dt><p><font face="Arial, sans-serif"><font size="2">The jOpenDocument +<dt><p><font face="Arial, sans-serif"><font size="2">The <b>jOpenDocument</b> interface is more promising, as it does shield the xml tree details and presents developers something which looks like a spreadsheet model.<br>However, unfortunately @@ -342,7 +342,7 @@ do sympathize with this business model but for octave needs this may hamper progress for a while.</font></font></p></dt> <dt><p><font face="Arial, sans-serif"><font size="2">The (still experimental) - UNO interface, based on a Java/UNO bridge linking a hidden OpenOffice.org + <b>UNO interface</b>, based on a Java/UNO bridge linking a hidden OpenOffice.org invocation to Octave, is the most promising: </font></font> <ul><li><font face="Arial, sans-serif"><font size="2"> @@ -368,6 +368,7 @@ Octave) while the ODF Toolkit and jOpenDocument classes also reside in the JVM. </font></font></li></ul> + <font face="Arial, sans-serif"><font size="2">However, UNO is not stable yet (see below)</font>. </p></dt> </dl> @@ -477,12 +478,16 @@ <font face="Arial, sans-serif"><font size="2">Speeding up (ODS is 10 X slower than e.g. OOXML !!!). jOpenDocument is much faster but still immature.<br> - UNO *is* MUCH faster than jOpenDocument but starting up OpenOffice.org + <b>UNO</b> *is* MUCH faster than jOpenDocument but starting up OpenOffice.org for the first time can take tens of seconds...<br> Note that UNO is still experimental. The issue is that odsclose() will simply kill ALL other OpenOffice.org invocations, also those that were not opened - through Octave! This is related to UNO-Java limitations. A way out is in - development stage. + through Octave! This is related to UNO-Java limitations.<br> + The underlying issue is that when Octave starts an OpenOffice.org invocation, + OpenOffice.org must be closed for Octave to be able to exit; otherwise Octave will + wait for OOo to shut down before it can terminate itself. So Octave must kill + OOo to be able to terminate.<br> + A way out hasn't been found yet. </font></font></p></li><li><p align="left"> \x93<font face="Arial, sans-serif"><font size="2">Passing function handle\x94 a la Matlab's </font></font><font face="Arial, sans-serif"><font size="2"><b>xlsread</b></font></font></p></li><li><p align="left"> Modified: trunk/octave-forge/main/io/doc/READ-XLS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-XLS.html 2011-09-21 11:48:47 UTC (rev 8575) +++ trunk/octave-forge/main/io/doc/READ-XLS.html 2011-09-21 18:06:41 UTC (rev 8576) @@ -212,23 +212,25 @@ </DL> </FONT></FONT><B><U><FONT FACE="Arial, sans-serif" SIZE=4><FONT FACE="Arial, sans-serif" SIZE=4><P ALIGN="CENTER">COMPARISON OF INTERFACES & USAGE</P> </B></U></FONT></FONT><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DL> -<DT>Using Excel itself (through COM / ActiveX on Windows systems) is probably the most robust and versatile and especially FAST option. There's one gotcha: in case of some type of COM errors Excel will keep running invisibly; you can only end it through Task Manager. <BR> +<DT>Using Excel itself (through <b>COM / ActiveX</b> on Windows systems) is probably the most robust and versatile and especially FAST option. There's one gotcha: in case of some type of COM errors Excel will keep running invisibly; you can only end it through Task Manager. <BR> A tiny problem is that one cannot find out easily through COM what file types are supported; xls, wks, wk1, xlsx, etc. <BR> Another -obvious- limitation is that COM Excel access only works on Windows systems where Excel is installed. <BR> <BR> -JExcelAPI (Java-based and therefore platform-independent) is proven technology but switching between reading and writing is quite involved and memory-hungry when processing large spreadsheets. As the docs state, JExcelAPI is optimized for reading and it does do that well - but still slower than Excel/COM. The fact that upon a switch from reading to writing the existing spreadsheet is overwritten <B>in place</B> by a blank one and that you can only get the contents back wen writing out all of the changes is worrying - and any change after the first write() is lost as a next write() doesn't seem to work, worse yet, you may completely loose the spreadsheet in question. The first is by JExcelAPI design, the second is probably a bug (in octave-forge/Java or JExcelAPI ? I don't know). Adding data to existing spreadsheets does work, but IMO undue user confidence is needed.</DT> +<b>JExcelAPI</b> (Java-based and therefore platform-independent) is proven technology but switching between reading and writing is quite involved and memory-hungry when processing large spreadsheets. As the docs state, JExcelAPI is optimized for reading and it does do that well - but still slower than Excel/COM. The fact that upon a switch from reading to writing the existing spreadsheet is overwritten <B>in place</B> by a blank one and that you can only get the contents back wen writing out all of the changes is worrying - and any change after the first write() is lost as a next write() doesn't seem to work, worse yet, you may completely loose the spreadsheet in question. The first is by JExcelAPI design, the second is probably a bug (in octave-forge/Java or JExcelAPI ? I don't know). Adding data to existing spreadsheets does work, but IMO undue user confidence is needed.</DT> <DT>JExcelAPI supports BIFF5 (only reading) and BIFF8 (Excel 95 and Excel 97-2003, respectively). Upon overwriting, BIFF5 spreadsheets are converted silently to BIFF8.</DT> <DT>JexcelAPI, unlike ApachePOI, doesn't evaluate functions while reading but instead relies on cached results (i.e. results computed by Excel itself). Depending on Excel settings ("Automatic calculation" ON or OFF) this may or may not yield incorrect (or expected) results. <BR> <BR> -Apache POI (Java-based and platform-independent too) is based on the OpenOffice.org I/O Excel r/w routines. It is a more versatile than JExcelAPI, while it doesn't support BIFF5 it does support BIFF8 (Excel 97 \x96 2003) and OOXML (Excel 2007).</DT> +<b>Apache POI</b> (Java-based and platform-independent too) is based on the OpenOffice.org I/O Excel r/w routines. It is a more versatile than JExcelAPI, while it doesn't support BIFF5 it does support BIFF8 (Excel 97 \x96 2003) and OOXML (Excel 2007).</DT> <DT>It is slower than native JXL let alone Excel & COM but it features active formula evaluation, although at the moment (v. 3.7) not all Excel functions have been implemented. I've made the relevant subfunction (xls2jpoi2oct) fall back to cached formula results (and yield a suitable warning) for non-implemented Excel functions while reading Excel files. <BR> <BR> -OpenXLS (an open source version of Extentech's commercial Java-xls product) is still experimental. It seems to work faster than JExcelAPI, but it has other issues - i.e., it locks the .xls file and the unlocking mechanism is a bit wonky. Sometimes xls files keep being locked until Octave is shut down. <BR> +<b>OpenXLS</b> (an open source version of Extentech's commercial Java-xls product) is still experimental. It seems to work faster than JExcelAPI, but it has other issues - i.e., it locks the .xls file and the unlocking mechanism is a bit wonky. Sometimes xls files keep being locked until Octave is shut down. <BR> <BR> -UNO (invoking OpenOffice.org or clones behind the scenes, a la ActiveX) is experimental. It works FAST (i.e., once OOo itself is loaded which can take some time) and can process much larger spreadsheets than the other Java-based interfaces because the data are not entered in the JVM but in OOo's memory.<BR> -A big stumbling block is that odsclose() on a UNO xls struct will kill ALL OpenOffice.org invocations, also those that were not related to Octave! This is due to UNO-Java limitations. A fix is under development.<BR><BR> +<b>UNO</b> (invoking OpenOffice.org or clones behind the scenes, a la ActiveX) is experimental. It works FAST (i.e., once OOo itself is loaded which can take some time) and can process much larger spreadsheets than the other Java-based interfaces because the data are not entered in the JVM but in OOo's memory.<BR> +A big stumbling block is that odsclose() on a UNO xls struct will kill ALL OpenOffice.org invocations, also those that were not related to Octave! This is due to UNO-Java limitations.<br> +The underlying issue is that when Octave starts an OpenOffice.org invocation, OpenOffice.org must be closed for Octave to be able to exit; otherwise Octave will wait for OOo to shut down before it can terminate itself. So Octave must kill OOo to be able to terminate.<br> +A way out hasn't been found yet.<br><br> All in all, of the three Java options I'd prefer Apache POI rather than OpenXLS or JexcelAPI. But the latter is indispensable for BIFF5 formats. Once UNO is stable it is to be preferred as it can read ALL file formats supported by OOo (viz. wk1, ods, xlsx, sxc, ...)</DT> -<DT>Some notes on the choice for Java:</DT> +<DT><br>Some notes on the choice for Java:</DT> </DL> <OL> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <prn...@us...> - 2011-11-13 16:45:44
|
Revision: 9079 http://octave.svn.sourceforge.net/octave/?rev=9079&view=rev Author: prnienhuis Date: 2011-11-13 16:45:38 +0000 (Sun, 13 Nov 2011) Log Message: ----------- Adapted to PKG_ADD / PKG_DEL. Modified Paths: -------------- trunk/octave-forge/main/io/doc/READ-ODS.html trunk/octave-forge/main/io/doc/READ-XLS.html Modified: trunk/octave-forge/main/io/doc/READ-ODS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-ODS.html 2011-11-13 16:31:09 UTC (rev 9078) +++ trunk/octave-forge/main/io/doc/READ-ODS.html 2011-11-13 16:45:38 UTC (rev 9079) @@ -18,7 +18,7 @@ Copyright \xA9 2009 - 2011 Philip Nienhuis <prnienhuis at users.sf.net></font></font> </p> <p align="center"><font face="Arial, sans-serif"><font size="2"> - This version September 4, 2011</font></font> + This version November 13, 2011</font></font> </p> <p><font face="Arial, sans-serif"><font size="2"> <i>(ODS = Open Document Format spreadsheet data format, used by e.g., OpenOffice.org.)</i></font></font> @@ -117,10 +117,11 @@ </li> </ul> <dl><dt> - <p><font face="Arial, sans-serif"><font size="2">These must be referenced with - full pathnames in your javaclasspath. Hint: add it in - ./share/octave/<version>/m/startup/octaverc using appropriate - javaaddpath statements</font></font> + <p><font face="Arial, sans-serif"><font size="2">These class libs must be referenced with + full pathnames in your javaclasspath.<br> + Except for the UNO (OOo) classes, the jar files had best be put in /<libdir>/java where <libdir> on Linux is usually /usr/lib; on MinGW it is usually /lib. The PKG_ADD command expects the class libs there; if they are elsewhere, add them in + ./share/octave/<version>/m/startup/octaverc using appropriate + javaaddpath statements or a chk_spreadsheet_support() call.</font></font> </p></dt><dt><p><br> </p></dt></dl> <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>USAGE</b></u></font></font></p> @@ -547,7 +548,7 @@ <font face="Arial, sans-serif"><font size="2">oct2ods.m (revision 7159)</font></font></li></ul> <p><font face="Arial, sans-serif"><font size="2">Enjoy!</font></font></p><p align="center"><font face="Arial, sans-serif"><font size="2">Philip - Nienhuis, September 4, 2011</font></font></p><dl><dd><p align="center"> + Nienhuis, November 13, 2011</font></font></p><dl><dd><p align="center"> <br> </p></dd></dl> </body></html> \ No newline at end of file Modified: trunk/octave-forge/main/io/doc/READ-XLS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-XLS.html 2011-11-13 16:31:09 UTC (rev 9078) +++ trunk/octave-forge/main/io/doc/READ-XLS.html 2011-11-13 16:45:38 UTC (rev 9079) @@ -4,7 +4,7 @@ <META NAME="Generator" CONTENT="Microsoft Word 97"> <META NAME="CREATED" CONTENT="20091211;17230700"> <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> -<META NAME="CHANGED" CONTENT="20101114;18083900"> +<META NAME="CHANGED" CONTENT="20101113;18083900"> </HEAD> <BODY LINK="#0000ff" VLINK="#800080"> @@ -13,7 +13,7 @@ <BR> Copyright (C) 2009 - 2011 Philip Nienhuis <prnienhuis at users.sf.net><BR> <BR> -This version September 4, 2011</P> +This version November 13, 2011</P> </FONT></FONT><B><U><FONT FACE="Arial, sans-serif" SIZE=4><FONT FACE="Arial, sans-serif" SIZE=4><P ALIGN="CENTER">EXCEL .XLS SUPPORT FILES</P> </B></U></FONT></FONT><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DL> <DT><BR> @@ -109,7 +109,7 @@ <LI>Get it here: </FONT></FONT><A HREF="http://sourceforge.net/projects/openxls/"><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2>http://sourceforge.net/projects/openxls/</FONT></FONT></A></LI></UL> <FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DL> -<DT>Hint: simply put the relevant javaaddpath statements in the .octaverc file.</DT></DL> +<DT>These class libs must be referenced with full pathnames in your javaclasspath.<br>They had best be put in /<libdir>/java where <libdir> on Linux is usually /usr/lib; on MinGW it is usually /lib. The PKG_ADD command expects the class libs there; if they are elsewhere, add them in ./share/octave/<version>/m/startup/octaverc using appropriate javaaddpath statements or a chk_spreadsheet_support() call.</DT></DL> <DL><DT>UNO specific (invoking OpenOffice.org (or clones) behind the scenes):<BR> NOTE: EXPERIMENTAL!! A working OpenOffice.org installation. The utility function chk_spreadsheet_support can be used to add the needed entries to the javaclasspath.</DT> </DL> @@ -323,6 +323,6 @@ <P>Enjoy!</FONT></FONT> </P> <FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DL> -<DD ALIGN="CENTER">Philip Nienhuis, September 4, 2011</DD> +<DD ALIGN="CENTER">Philip Nienhuis, November 13, 2011</DD> </DL></FONT></FONT></BODY> </HTML> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <prn...@us...> - 2012-02-26 23:56:03
|
Revision: 9709 http://octave.svn.sourceforge.net/octave/?rev=9709&view=rev Author: prnienhuis Date: 2012-02-26 23:55:56 +0000 (Sun, 26 Feb 2012) Log Message: ----------- Updated to current operation of spreadsheet scripts Modified Paths: -------------- trunk/octave-forge/main/io/doc/READ-ODS.html trunk/octave-forge/main/io/doc/READ-XLS.html Modified: trunk/octave-forge/main/io/doc/READ-ODS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-ODS.html 2012-02-26 23:50:58 UTC (rev 9708) +++ trunk/octave-forge/main/io/doc/READ-ODS.html 2012-02-26 23:55:56 UTC (rev 9709) @@ -6,7 +6,7 @@ <meta name="AUTHOR" content="Philip Nienhuis"> <meta name="CREATED" content="20091229;22213000"> <meta name="CHANGEDBY" content="Philip Nienhuis"> - <meta name="CHANGED" content="20101114;18275600"> + <meta name="CHANGED" content="20120226;18275600"> <meta name="Info 1" content=""> <meta name="CHANGEDBY" content="Philip Nienhuis"></head> @@ -15,10 +15,10 @@ <b>ODS support for Octave</b></font></font></u> </p> <p align="center"><font face="Arial, sans-serif"><font size="2"> - Copyright \xA9 2009 - 2011 Philip Nienhuis <prnienhuis at users.sf.net></font></font> + Copyright \xA9 2009 - 2012 Philip Nienhuis <prnienhuis at users.sf.net></font></font> </p> <p align="center"><font face="Arial, sans-serif"><font size="2"> - This version November 16, 2011</font></font> + This version February 26, 2012</font></font> </p> <p><font face="Arial, sans-serif"><font size="2"> <i>(ODS = Open Document Format spreadsheet data format, used by e.g., OpenOffice.org.)</i></font></font> @@ -342,7 +342,8 @@ the jOpenDocument developers state that their development is primarily driven by requests from customers who pay for support. I do sympathize with this business model but for octave needs this may - hamper progress for a while.</font></font></p></dt> + hamper progress for a while.<br> + In addition, jOpenDocument 1.2 has bugs here and there. For one, it doesn't write appropriate OfficeValueType attributes to the cells, so there's no way to reliably read and distinguish boolean, string amnd integer values.</font></font></p></dt> <dt><p><font face="Arial, sans-serif"><font size="2">The (still experimental) <b>UNO interface</b>, based on a Java/UNO bridge linking a hidden OpenOffice.org invocation to Octave, is the most promising: @@ -370,7 +371,7 @@ Octave) while the ODF Toolkit and jOpenDocument classes also reside in the JVM. </font></font></li></ul> - <font face="Arial, sans-serif"><font size="2">However, UNO is not stable yet (see below)</font>. + <font face="Arial, sans-serif"><font size="2">However, UNO is not stable yet (see below).</font>. </p></dt> </dl> @@ -549,7 +550,7 @@ <font face="Arial, sans-serif"><font size="2">oct2ods.m (revision 7159)</font></font></li></ul> <p><font face="Arial, sans-serif"><font size="2">Enjoy!</font></font></p><p align="center"><font face="Arial, sans-serif"><font size="2">Philip - Nienhuis, November 16, 2011</font></font></p><dl><dd><p align="center"> + Nienhuis, February 26, 2012</font></font></p><dl><dd><p align="center"> <br> </p></dd></dl> </body></html> \ No newline at end of file Modified: trunk/octave-forge/main/io/doc/READ-XLS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-XLS.html 2012-02-26 23:50:58 UTC (rev 9708) +++ trunk/octave-forge/main/io/doc/READ-XLS.html 2012-02-26 23:55:56 UTC (rev 9709) @@ -4,21 +4,21 @@ <META NAME="Generator" CONTENT="Microsoft Word 97"> <META NAME="CREATED" CONTENT="20091211;17230700"> <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> -<META NAME="CHANGED" CONTENT="20101113;18083900"> +<META NAME="CHANGED" CONTENT="20120226;18083900"> </HEAD> <BODY LINK="#0000ff" VLINK="#800080"> <P><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"></P> <FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><P ALIGN="CENTER">README for Excel spreadsheet file r/w access scripts for octave (> 3.4.0)<BR> <BR> -Copyright (C) 2009 - 2011 Philip Nienhuis <prnienhuis at users.sf.net><BR> +Copyright (C) 2009 - 2012 Philip Nienhuis <prnienhuis at users.sf.net><BR> <BR> -This version November 13, 2011</P> +This version Februari 26, 2012</P> </FONT></FONT><B><U><FONT FACE="Arial, sans-serif" SIZE=4><FONT FACE="Arial, sans-serif" SIZE=4><P ALIGN="CENTER">EXCEL .XLS SUPPORT FILES</P> </B></U></FONT></FONT><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DL> <DT><BR> <B>doc/README-XLS.html</B><BR> -This file.</FONT></FONT> </DT><BR><BR> +This file.</FONT></FONT> </DT><BR> <B><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DT>xlsread.m</DT> </B><DT>All-in-one function for reading data from one specific worksheet in an Excel spreadsheet file. This script has Matlab-compatible functionality. <BR> </DT><BR> @@ -58,14 +58,14 @@ <UL> <LI>A windows computer with Excel installed</LI> -<LI>Octave-forge Windows-1.0.8 or later package WITH LATEST SVN PATCHES APPLIED</LI></UL> +<LI>Octave-forge Windows-1.0.8 (WITH LATEST SVN PATCHES APPLIED) or later package (preferrably 1.1.10 or later)</LI></UL> <P>For the Java / Apache POI / JExcelAPI interfaces (general):</FONT></FONT> </P> <UL> <FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><LI>octave-forge java-1.2.8 package or later version on Linux</LI> <LI>octave-forge java-1.2.8 with latest svn fixes on Windows/MingW</LI> -<LI>Java jre or jdk > 1.6.0 (hasn't been tested with earlier versions)</LI></UL> +<LI>Java JRE or JDK > 1.6.0 (hasn't been tested with earlier versions)</LI></UL> <DL> <DT>Apache POI specific:</DT> @@ -111,7 +111,7 @@ <FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DL> <DT>These class libs must be referenced with full pathnames in your javaclasspath.<br>They had best be put in /<libdir>/java where <libdir> on Linux is usually /usr/lib; on MinGW it is usually /lib. The PKG_ADD command expects the class libs there; if they are elsewhere, add them in ./share/octave/<version>/m/startup/octaverc using appropriate javaaddpath statements or a chk_spreadsheet_support() call.</DT></DL> <DL><DT>UNO specific (invoking OpenOffice.org (or clones) behind the scenes):<BR> -NOTE: EXPERIMENTAL!! A working OpenOffice.org installation. The utility function chk_spreadsheet_support can be used to add the needed entries to the javaclasspath.</DT> +NOTE: EXPERIMENTAL!! A working OpenOffice.org installation. The utility function chk_spreadsheet_support can be used to add the needed entries to the javaclasspath.<BR></DT> </DL> <P ALIGN="CENTER"><BR> </FONT></FONT><B><U><FONT FACE="Arial, sans-serif" SIZE=4><FONT FACE="Arial, sans-serif" SIZE=4>USAGE</P> @@ -165,7 +165,7 @@ </FONT></FONT><B><U><FONT FACE="Arial, sans-serif" SIZE=4><FONT FACE="Arial, sans-serif" SIZE=4><P ALIGN="CENTER">SPREADSHEET FORMULA SUPPORT</P> </B></U></FONT></FONT><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DL> <DT><BR> -When using the POI and JXL interfaces you can:</DT> +When using the POI, JXL and UNO interfaces you can:</DT> </DL> <UL> @@ -191,24 +191,24 @@ <BR> Matlab's <B>xlsread</B> flags some spreadsheet errors, octave-forge just returns blank cells.<BR> <BR> -Octave-forge returns info about the actual (rather than the requested) cell range where the data came from. Personally I find it very useful to know from what part of a worksheet the data originate so I've put quite some effort in it :-)</DT> +Octave's xlsread returns info about the actual (rather than the requested) cell range where the data came from. Personally I find it very useful to know from what part of a worksheet the data originate so I've put quite some effort in it :-)</DT> <DT>Matlab can't, due to Excel automatically trimming returned arrays from empty outer columns and rows. Octave is more clever but the Visual Basic call used for determining the actually used range has some limitations: (1) it relies on cached range values and thus may be out-of-date, and (2) it counts empty formatted cells too. When using ActiveX/COM, if octave's <B>xlsfinfo</B>.m returns wrong data ranges it is most often an overestimation.</DT> <DT>Matlab's <B>xlsread</B> ignores all non-numeric data values outside the smallest rectangle encompassing all numerical values. Octave's <B>xlsread</B> doesn't. This means that Matlab ignores all row/column headers, not very user-friendly IMO. <BR> <BR> -When using the Java interface, reading and writing xls-files by octave-forge is platform-independent. On systems w/o installed Excel, Matlab can only read Excel 95 formatted .xls files (written using ML <B>xlswrite</B>'s 'Basic" option) \x96 and then differently than under Windows.....</DT> +When using the Java interface, reading and writing xls-files by octave's xlsread is platform-independent. On systems w/o installed Excel, Matlab can only read Excel 95 formatted .xls files (written using ML <B>xlswrite</B>'s 'Basic" option) \x96 and then differently than under Windows.....</DT> <DT>Matlab's <B>xlsread</B> returns strings for cells containing date values. This makes for endless if-then-elseif-else-end constructs to catch all expected date formates. Octave returns numerical data (where 0 = 1/1/1900 \x96 you can easily transfer them into proper octave date values yourself using e.g. datestr(), see bottom of this document for more info).<BR> <BR> -Matlab's <B>xlsread</B> invokes <B>csvread</B> if no Excel interface is present. Octave-forge's <B>xlsread</B> doesn't.<BR> +Matlab's <B>xlsread</B> invokes <B>csvread</B> if no Excel interface is present. Octave's <B>xlsread</B> doesn't.<BR> <BR> <B><U>xlswrite</B></U><BR> -Octave-forge's <B>xlswrite</B> works on systems w/o Excel support, Matlab's doesn't (properly).</DT> +Octave's <B>xlswrite</B> works on systems w/o Excel support, Matlab's doesn't (properly).</DT> <DT>When specifying a sheet number larger than the number of existing sheets in an .xls file, Matlab's <B>xlswrite</B> adds empty sheets until the new sheet number is created; Octave's <B>xlswrite</B> only adds one sheet called "Sheet<number>" where <number> is the specified sheet number. </DT> <DT>Even better (IMO) while M's <B>xlswrite</B> always creates Sheet1/Sheet2/Sheet3 when creating a new spreadsheet, octave's <B>xlswrite</B> only creates the requested worksheet. (Did you know that you can instruct Excel to create spreadsheets with just one, or any number of, worksheets? Look in Tools | Options, General tab.)</DT> <DT>Oh and octave doesn't touch the "active sheet" - but that's not automatically an advantage.</DT> <DT>If the specified write range is larger than the actual data array, Matlab's <B>xlswrite</B> adds #N/A cells to fill up the lowermost rows and rightmost columns; octave-forge's <B>xlswrite</B> doesn't. <BR> <BR> <B>xlsfinfo</B><BR> -When invoking Excel/COM interface, octave-forge's <B>xlsfinfo</B> also echoes the type of sheet (worksheet, chart), not just the sheet names. Using Java I haven't found similar functionality (yet).</DT> +When invoking Excel/COM interface, octave's <B>xlsfinfo</B> also echoes the type of sheet (worksheet, chart), not just the sheet names. Using Java I haven't found similar functionality (yet).</DT> </DL> </FONT></FONT><B><U><FONT FACE="Arial, sans-serif" SIZE=4><FONT FACE="Arial, sans-serif" SIZE=4><P ALIGN="CENTER">COMPARISON OF INTERFACES & USAGE</P> </B></U></FONT></FONT><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DL> @@ -223,7 +223,7 @@ <b>Apache POI</b> (Java-based and platform-independent too) is based on the OpenOffice.org I/O Excel r/w routines. It is a more versatile than JExcelAPI, while it doesn't support BIFF5 it does support BIFF8 (Excel 97 \x96 2003) and OOXML (Excel 2007).</DT> <DT>It is slower than native JXL let alone Excel & COM but it features active formula evaluation, although at the moment (v. 3.7) not all Excel functions have been implemented. I've made the relevant subfunction (xls2jpoi2oct) fall back to cached formula results (and yield a suitable warning) for non-implemented Excel functions while reading Excel files. <BR> <BR> -<b>OpenXLS</b> (an open source version of Extentech's commercial Java-xls product) is still experimental. It seems to work faster than JExcelAPI, but it has other issues - i.e., it locks the .xls file and the unlocking mechanism is a bit wonky. Sometimes xls files keep being locked until Octave is shut down. Currently OXS write support is disabled (but the code is there).<BR> +<b>OpenXLS</b> (an open source version of Extentech's commercial Java-xls product) is still experimental. It seems to work faster than JExcelAPI, but it has other issues - i.e., it locks the .xls file and the unlocking mechanism is a bit wonky. Sometimes xls files keep being locked until Octave is shut down. Currently OXS write support is disabled (but the code is there). OpenmXLS doesn't support reading back formulas astext strings.<BR> <BR> <b>UNO</b> (invoking OpenOffice.org or clones behind the scenes, a la ActiveX) is experimental. It works FAST (i.e., once OOo itself is loaded which can take some time) and can process much larger spreadsheets than the other Java-based interfaces because the data are not entered in the JVM but in OOo's memory.<BR> A big stumbling block is that odsclose() on a UNO xls struct will kill ALL OpenOffice.org invocations, also those that were not related to Octave! This is due to UNO-Java limitations.<br> @@ -323,6 +323,6 @@ <P>Enjoy!</FONT></FONT> </P> <FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DL> -<DD ALIGN="CENTER">Philip Nienhuis, November 13, 2011</DD> +<DD ALIGN="CENTER">Philip Nienhuis, Februari 26, 2012</DD> </DL></FONT></FONT></BODY> </HTML> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <prn...@us...> - 2012-06-07 16:35:52
|
Revision: 10584 http://octave.svn.sourceforge.net/octave/?rev=10584&view=rev Author: prnienhuis Date: 2012-06-07 16:35:46 +0000 (Thu, 07 Jun 2012) Log Message: ----------- Updated / spell checks Modified Paths: -------------- trunk/octave-forge/main/io/doc/READ-ODS.html trunk/octave-forge/main/io/doc/READ-XLS.html Modified: trunk/octave-forge/main/io/doc/READ-ODS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-ODS.html 2012-06-07 15:50:19 UTC (rev 10583) +++ trunk/octave-forge/main/io/doc/READ-ODS.html 2012-06-07 16:35:46 UTC (rev 10584) @@ -18,7 +18,7 @@ Copyright \xA9 2009 - 2012 Philip Nienhuis <prnienhuis at users.sf.net></font></font> </p> <p align="center"><font face="Arial, sans-serif"><font size="2"> - This version April 09, 2012</font></font> + This version June 07, 2012</font></font> </p> <p><font face="Arial, sans-serif"><font size="2"> <i>(ODS = Open Document Format spreadsheet data format, used by e.g., OpenOffice.org.)</i></font></font> @@ -62,7 +62,11 @@ <font face="Arial, sans-serif"><font size="2"><b>calccelladdress.m</b></font></font></dt><dt style="font-style: italic;"> <font face="Arial, sans-serif"><font size="2"><b>parse_sp_range.m</b></font></font></dt><dt> <font face="Arial, sans-serif"><font size="2">Support files called by - the scripts and not meant for direct invocation by users.</font></font></dt><dd></dd> + the scripts and not meant for direct invocation by users.</font></font></dt><dt> + <p><font face="Arial, sans-serif"><font size="2"><i><b>io_ods_testscript.m</b></i> + <br>Script for testing basic operation of ODS spreadsheet functions.</font></font></p><br></dt> + + </dl> <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>REQUIRED SUPPORT SOFTWARE</b></u></font></font></p><dl> @@ -172,10 +176,10 @@ interface you can:</font></font></dt></dl> <ul> <li> - <font face="Arial, sans-serif"><font size="2">(When reading, <b>od</b><b>s2oct</b>) + <font face="Arial, sans-serif"><font size="2">(When reading, <b>ods2oct</b>) either read spreadsheet formula results, or the literal formula text strings;</font></font></li><li> - <font face="Arial, sans-serif"><font size="2">(When writing, <b>oct2</b><b>od</b><b>s</b>) + <font face="Arial, sans-serif"><font size="2">(When writing, <b>oct2ods</b>) either enter formulas in the worksheet as formulas, or enter them as literal text strings.</font></font></li></ul> <font face="Arial, sans-serif"><font size="2">In short, you can @@ -550,7 +554,7 @@ <font face="Arial, sans-serif"><font size="2">oct2ods.m (revision 7159)</font></font></li></ul> <p><font face="Arial, sans-serif"><font size="2">Enjoy!</font></font></p><p align="center"><font face="Arial, sans-serif"><font size="2">Philip - Nienhuis, April 09, 2012</font></font></p><dl><dd><p align="center"> + Nienhuis, June 07, 2012</font></font></p><dl><dd><p align="center"> <br> </p></dd></dl> </body></html> \ No newline at end of file Modified: trunk/octave-forge/main/io/doc/READ-XLS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-XLS.html 2012-06-07 15:50:19 UTC (rev 10583) +++ trunk/octave-forge/main/io/doc/READ-XLS.html 2012-06-07 16:35:46 UTC (rev 10584) @@ -13,7 +13,7 @@ <BR> Copyright (C) 2009 - 2012 Philip Nienhuis <prnienhuis at users.sf.net><BR> <BR> -This version Februari 26, 2012</P> +This version June 7, 2012</P> </FONT></FONT><B><U><FONT FACE="Arial, sans-serif" SIZE=4><FONT FACE="Arial, sans-serif" SIZE=4><P ALIGN="CENTER">EXCEL .XLS SUPPORT FILES</P> </B></U></FONT></FONT><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DL> <DT><BR> @@ -48,7 +48,11 @@ </DL> <B>spsh_chkrange.m</B>,</FONT></FONT> <B><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2>spsh_prstype.m</B>,</FONT></FONT> <B><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2>getusedrange.m</B>,</FONT></FONT> <B><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2>calccelladdress.m</B>,</FONT></FONT> <B><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2>parse_sp_range.m </B> -<DT>Support files called by the scripts and not meant for direct invocation by users.</DT> +<DT>Support files called by the scripts and not meant for direct invocation by users.<BR></DT> +<BR> +<DT><B>io_xls_testscript.m</B></DT> +<DT>Script for testing basic features of the spreadsheet scripts.</DT> +</DL> <P ALIGN="CENTER"><BR> </FONT></FONT><B><U><FONT FACE="Arial, sans-serif" SIZE=4><FONT FACE="Arial, sans-serif" SIZE=4>REQUIRED SUPPORT SOFTWARE</P> </B></U></FONT></FONT><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DL> @@ -165,12 +169,12 @@ </FONT></FONT><B><U><FONT FACE="Arial, sans-serif" SIZE=4><FONT FACE="Arial, sans-serif" SIZE=4><P ALIGN="CENTER">SPREADSHEET FORMULA SUPPORT</P> </B></U></FONT></FONT><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DL> <DT><BR> -When using the POI, JXL and UNO interfaces you can:</DT> +When using the COM, POI, JXL, and UNO interfaces you can:</DT> </DL> <UL> -<LI>(When reading, xls2oct) either read spreadsheet formula results (like in COM interface), or the literal formula text strings;</LI> -<LI>(When writing, oct2xls) either enter formulas in the worksheet as formulas, or enter them as literal text strings. The former is also like in COM.</LI></UL> +<LI>(When reading, xls2oct) either read evaluated spreadsheet formula results, or the literal formula text strings;</LI> +<LI>(When writing, oct2xls) either enter text strings in the form of spreadsheet formulas in the worksheet as formulas, or enter them as literal text strings.</LI></UL> <P>In short, you can enter spreadsheet formulas and in a later stage read them back, change them and re-enter them in the worksheet. </P> <DL> @@ -221,9 +225,9 @@ <DT>JexcelAPI, unlike ApachePOI, doesn't evaluate functions while reading but instead relies on cached results (i.e. results computed by Excel itself). Depending on Excel settings ("Automatic calculation" ON or OFF) this may or may not yield incorrect (or expected) results. <BR> <BR> <b>Apache POI</b> (Java-based and platform-independent too) is based on the OpenOffice.org I/O Excel r/w routines. It is a more versatile than JExcelAPI, while it doesn't support BIFF5 it does support BIFF8 (Excel 97 \x96 2003) and OOXML (Excel 2007).</DT> -<DT>It is slower than native JXL let alone Excel & COM but it features active formula evaluation, although at the moment (v. 3.7) not all Excel functions have been implemented. I've made the relevant subfunction (xls2jpoi2oct) fall back to cached formula results (and yield a suitable warning) for non-implemented Excel functions while reading Excel files. <BR> +<DT>It is slower than native JXL let alone Excel & COM but it features active formula evaluation, although at the moment (v. 3.8) still not all Excel functions have been implemented. I've made the relevant subfunction (xls2jpoi2oct) fall back to cached formula results (and yield a suitable warning) for non-implemented Excel functions while reading Excel files. <BR> <BR> -<b>OpenXLS</b> (an open source version of Extentech's commercial Java-xls product) is still experimental. It seems to work faster than JExcelAPI, but it has other issues - i.e., it locks the .xls file and the unlocking mechanism is a bit wonky. Sometimes xls files keep being locked until Octave is shut down. Currently OXS write support is disabled (but the code is there). OpenmXLS doesn't support reading back formulas astext strings.<BR> +<b>OpenXLS</b> (an open source version of Extentech's commercial Java-xls product) is still experimental. It seems to work faster than JExcelAPI, but it has other issues - i.e., it locks the .xls file and the unlocking mechanism is a bit wonky. Sometimes xls files keep being locked until Octave is shut down. Currently OXS write support is disabled (but the code is there). OpenXLS doesn't support reading back formulas as text strings.<BR> <BR> <b>UNO</b> (invoking OpenOffice.org or clones behind the scenes, a la ActiveX) is experimental. It works FAST (i.e., once OOo itself is loaded which can take some time) and can process much larger spreadsheets than the other Java-based interfaces because the data are not entered in the JVM but in OOo's memory.<BR> A big stumbling block is that odsclose() on a UNO xls struct will kill ALL OpenOffice.org invocations, also those that were not related to Octave! This is due to UNO-Java limitations.<br> @@ -323,6 +327,6 @@ <P>Enjoy!</FONT></FONT> </P> <FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DL> -<DD ALIGN="CENTER">Philip Nienhuis, Februari 26, 2012</DD> +<DD ALIGN="CENTER">Philip Nienhuis, June 7, 2012</DD> </DL></FONT></FONT></BODY> </HTML> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <prn...@us...> - 2012-09-07 09:01:11
|
Revision: 10969 http://octave.svn.sourceforge.net/octave/?rev=10969&view=rev Author: prnienhuis Date: 2012-09-07 09:01:00 +0000 (Fri, 07 Sep 2012) Log Message: ----------- Updated text Modified Paths: -------------- trunk/octave-forge/main/io/doc/READ-ODS.html trunk/octave-forge/main/io/doc/READ-XLS.html Modified: trunk/octave-forge/main/io/doc/READ-ODS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-ODS.html 2012-09-07 08:55:50 UTC (rev 10968) +++ trunk/octave-forge/main/io/doc/READ-ODS.html 2012-09-07 09:01:00 UTC (rev 10969) @@ -18,7 +18,7 @@ Copyright \xA9 2009 - 2012 Philip Nienhuis <prnienhuis at users.sf.net></font></font> </p> <p align="center"><font face="Arial, sans-serif"><font size="2"> - This version June 08, 2012</font></font> + This version September 7, 2012</font></font> </p> <p><font face="Arial, sans-serif"><font size="2"> <i>(ODS = Open Document Format spreadsheet data format, used by e.g., OpenOffice.org.)</i></font></font> @@ -88,14 +88,19 @@ <ul> <li> <p align="left"><font face="Arial, sans-serif"><font size="2"> - (currently the preferred option) <b>odfdom.jar</b> (<u>only</u> versions <b>0.7.5</b>, - <b>0.8.6</b>, <b>0.8.7</b> and <b>0.8.8</b>(-incubator) work OK!) & <b>xercesImpl.jar</b> (watch out here too! only version 2.9.1 (2007-sep-14) works OK with odfdom). Get them here: + <b>odfdom.jar</b> currently the preferred option)<br> + (<u>only</u> versions <b>0.7.5</b>, + <b>0.8.6</b>, <b>0.8.7</b> and <b>0.8.8</b> (the latter from incubator v. 0.5, see download URL below) work OK!) & <b>xercesImpl.jar</b> (watch out here too! only version 2.9.1 (2007-sep-14) works OK with odfdom). Get them here: </font></font></p> - </li><li><p align="left"> - <a href="http://odftoolkit.org/projects/odfdom/pages/Home"><font face="Arial, sans-serif"><font size="2">http://odftoolkit.org/projects/odfdom/pages/Home</font></font></a></p></li> - <li><p align="left" lang="zxx"> - <font color="#000080"><font face="Arial, sans-serif"><font size="2"><a href="http://incubator.apache.org/odftoolkit/downloads.html"><font face="Arial, sans-serif"><font size="2">http://incubator.apache.org/odftoolkit/downloads.html</font></font></a></font></font></font></p></li><li><p align="left"> - <a href="http://www.google.com/search?ie=UTF-8&oe=utf-8&q=xerces-2.9.1+download"><font face="Arial, sans-serif"><font size="2">Google for xerces-2.9.1 download </font></font></a></p></li> + </li> + <ul> + <li> + <p align="left"><a href="http://odftoolkit.org/projects/odfdom/pages/Home"><font face="Arial, sans-serif"><font size="2">http://odftoolkit.org/projects/odfdom/pages/Home</font></font></a></p> + </li><li> + <p align="left" lang="zxx"><font color="#000080"><font face="Arial, sans-serif"><font size="2"><a href="http://incubator.apache.org/odftoolkit/downloads.html"><font face="Arial, sans-serif"><font size="2">http://incubator.apache.org/odftoolkit/downloads.html</font></font></a> (preferred)</font></font></font></p> + </li><li><p align="left"><a href="http://www.google.com/search?ie=UTF-8&oe=utf-8&q=xerces-2.9.1+download"><font face="Arial, sans-serif"><font size="2">Google for xerces-2.9.1 download</a></p> + </li> + </ul> </ul> <dl><dt><p> <br><font face="Arial, sans-serif"><font size="2">and/or</font></font> @@ -557,7 +562,7 @@ <font face="Arial, sans-serif"><font size="2">oct2ods.m (revision 7159)</font></font></li></ul> <p><font face="Arial, sans-serif"><font size="2">Enjoy!</font></font></p><p align="center"><font face="Arial, sans-serif"><font size="2">Philip - Nienhuis, June 08, 2012</font></font></p><dl><dd><p align="center"> + Nienhuis, September 7, 2012</font></font></p><dl><dd><p align="center"> <br> </p></dd></dl> </body></html> \ No newline at end of file Modified: trunk/octave-forge/main/io/doc/READ-XLS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-XLS.html 2012-09-07 08:55:50 UTC (rev 10968) +++ trunk/octave-forge/main/io/doc/READ-XLS.html 2012-09-07 09:01:00 UTC (rev 10969) @@ -13,7 +13,7 @@ <BR> Copyright (C) 2009 - 2012 Philip Nienhuis <prnienhuis at users.sf.net><BR> <BR> -This version June 7, 2012</P> +This version September 7, 2012</P> </FONT></FONT><B><U><FONT FACE="Arial, sans-serif" SIZE=4><FONT FACE="Arial, sans-serif" SIZE=4><P ALIGN="CENTER">EXCEL .XLS SUPPORT FILES</P> </B></U></FONT></FONT><FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DL> <DT><BR> @@ -68,7 +68,7 @@ <UL> <FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><LI>octave-forge java-1.2.8 package or later version on Linux</LI> -<LI>octave-forge java-1.2.8 with latest svn fixes on Windows/MingW</LI> +<LI>octave-forge java-1.2.8 with latest svn fixes, or later version on Windows/MingW</LI> <LI>Java JRE or JDK > 1.6.0 (hasn't been tested with earlier versions)</LI></UL> <DL> @@ -327,6 +327,6 @@ <P>Enjoy!</FONT></FONT> </P> <FONT FACE="Arial, sans-serif" SIZE=2><FONT FACE="Arial, sans-serif" SIZE=2><DL> -<DD ALIGN="CENTER">Philip Nienhuis, June 7, 2012</DD> +<DD ALIGN="CENTER">Philip Nienhuis, September 7, 2012</DD> </DL></FONT></FONT></BODY> </HTML> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <prn...@us...> - 2012-09-07 14:14:55
|
Revision: 10974 http://octave.svn.sourceforge.net/octave/?rev=10974&view=rev Author: prnienhuis Date: 2012-09-07 14:14:41 +0000 (Fri, 07 Sep 2012) Log Message: ----------- CRLF to LF Modified Paths: -------------- trunk/octave-forge/main/io/doc/READ-ODS.html trunk/octave-forge/main/io/doc/READ-XLS.html Modified: trunk/octave-forge/main/io/doc/READ-ODS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-ODS.html 2012-09-07 14:14:16 UTC (rev 10973) +++ trunk/octave-forge/main/io/doc/READ-ODS.html 2012-09-07 14:14:41 UTC (rev 10974) @@ -1,17 +1,17 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> -<html><head> - <meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252"> - - <title></title><meta name="GENERATOR" content="OpenOffice.org 3.2 (Win32)"> - <meta name="AUTHOR" content="Philip Nienhuis"> - <meta name="CREATED" content="20091229;22213000"> - <meta name="CHANGEDBY" content="Philip Nienhuis"> - <meta name="CHANGED" content="20120226;18275600"> - <meta name="Info 1" content=""> - <meta name="CHANGEDBY" content="Philip Nienhuis"></head> - -<body dir="ltr" lang="en-US"> -<p align="center"><u><font face="Arial, sans-serif"><font size="4"> +<html><head> + <meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252"> + + <title></title><meta name="GENERATOR" content="OpenOffice.org 3.2 (Win32)"> + <meta name="AUTHOR" content="Philip Nienhuis"> + <meta name="CREATED" content="20091229;22213000"> + <meta name="CHANGEDBY" content="Philip Nienhuis"> + <meta name="CHANGED" content="20120226;18275600"> + <meta name="Info 1" content=""> + <meta name="CHANGEDBY" content="Philip Nienhuis"></head> + + <body dir="ltr" lang="en-US"> + <p align="center"><u><font face="Arial, sans-serif"><font size="4"> <b>ODS support for Octave</b></font></font></u> </p> <p align="center"><font face="Arial, sans-serif"><font size="2"> @@ -19,8 +19,8 @@ </p> <p align="center"><font face="Arial, sans-serif"><font size="2"> This version September 7, 2012</font></font> -</p> -<p><font face="Arial, sans-serif"><font size="2"> +</p> + <p><font face="Arial, sans-serif"><font size="2"> <i>(ODS = Open Document Format spreadsheet data format, used by e.g., OpenOffice.org.)</i></font></font> </p> <dl><dt> @@ -43,8 +43,8 @@ <p><font face="Arial, sans-serif"><font size="2"><i><b>oct2ods.m</b></i> <br>Write data to an ODS spreadsheet file using the file pointer handed by odsopen.</font></font></p></dt><dt> <p><font face="Arial, sans-serif"><font size="2"><i><b>odsclose.m</b></i> - <br>Close file handle made by odsopen and -if data have been transfered to a spreadsheet- save - data.</font></font></p></dt><dt> + <br>Close file handle made by odsopen and -if data have been transfered to a spreadsheet- save + data.</font></font></p></dt><dt> <p><font face="Arial, sans-serif"><font size="2"><i><b>odsfinfo.m</b></i> <br>Explore sheet names and optionally estimated data size of ods files with unknown content.</font></font></p></dt><dt> <p><font face="Arial, sans-serif"><font size="2"><i><b>calccelladdress.m</b></i> @@ -56,41 +56,41 @@ not specifically meant for direct invocation from the Octave prompt (it is more useful during initialization of Octave itself) it can be very helpful when hunting down issues with spreadsheet support in Octave.</font></font></p></dt> - <dt style="font-style: italic;"><font face="Arial, sans-serif"><font size="2"><b>spsh_chkrange.m</b></font></font></dt><dt style="font-style: italic;"> - <font face="Arial, sans-serif"><font size="2"><b>spsh_prstype.m</b></font></font></dt><dt style="font-style: italic;"> - <font face="Arial, sans-serif"><font size="2"><b>getusedrange.m</b></font></font></dt><dt style="font-style: italic;"> - <font face="Arial, sans-serif"><font size="2"><b>calccelladdress.m</b></font></font></dt><dt style="font-style: italic;"> - <font face="Arial, sans-serif"><font size="2"><b>parse_sp_range.m</b></font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">Support files called by - the scripts and not meant for direct invocation by users.</font></font></dt><dt> + <dt style="font-style: italic;"><font face="Arial, sans-serif"><font size="2"><b>spsh_chkrange.m</b></font></font></dt><dt style="font-style: italic;"> + <font face="Arial, sans-serif"><font size="2"><b>spsh_prstype.m</b></font></font></dt><dt style="font-style: italic;"> + <font face="Arial, sans-serif"><font size="2"><b>getusedrange.m</b></font></font></dt><dt style="font-style: italic;"> + <font face="Arial, sans-serif"><font size="2"><b>calccelladdress.m</b></font></font></dt><dt style="font-style: italic;"> + <font face="Arial, sans-serif"><font size="2"><b>parse_sp_range.m</b></font></font></dt><dt> + <font face="Arial, sans-serif"><font size="2">Support files called by + the scripts and not meant for direct invocation by users.</font></font></dt><dt> <p><font face="Arial, sans-serif"><font size="2"><i><b>io_ods_testscript.m</b></i> <br>Script for testing basic operation of ODS spreadsheet functions.</font></font></p><br></dt> -</dl> -<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>REQUIRED -SUPPORT SOFTWARE</b></u></font></font></p><dl> - </dl><font style="font-weight: bold; font-style: italic;" face="Arial, sans-serif"><font size="2">For - Windows (MingW):</font></font> -<ul> - <li><p align="left"> - <font face="Arial, sans-serif"><font size="2">Octave with Java package - (preferrably >= 1.2.8, although 1.2.6 will do for most functionality)</font></font></p></li></ul> -<dl style="font-style: italic; font-weight: bold;"> - <dt><p><font face="Arial, sans-serif"><font size="2">For Linux:</font></font></p></dt></dl> -<ul> - <li><p align="left"> - <font face="Arial, sans-serif"><font size="2">Octave with Java package - (preferrably >= 1.2.8, although 1.2.5 will do for most functionality)</font></font></p></li></ul> - <p><font face="Arial, sans-serif"><font size="2">For ODS access, - you'll need to choose at least one of the following java class files - collections:</font></font></p> -<ul> - <li> +</dl> + <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>REQUIRED + SUPPORT SOFTWARE</b></u></font></font></p><dl> + </dl><font style="font-weight: bold; font-style: italic;" face="Arial, sans-serif"><font size="2">For + Windows (MingW):</font></font> + <ul> + <li><p align="left"> + <font face="Arial, sans-serif"><font size="2">Octave with Java package + (preferrably >= 1.2.8, although 1.2.6 will do for most functionality)</font></font></p></li></ul> + <dl style="font-style: italic; font-weight: bold;"> + <dt><p><font face="Arial, sans-serif"><font size="2">For Linux:</font></font></p></dt></dl> + <ul> + <li><p align="left"> + <font face="Arial, sans-serif"><font size="2">Octave with Java package + (preferrably >= 1.2.8, although 1.2.5 will do for most functionality)</font></font></p></li></ul> + <p><font face="Arial, sans-serif"><font size="2">For ODS access, + you'll need to choose at least one of the following java class files + collections:</font></font></p> + <ul> + <li> <p align="left"><font face="Arial, sans-serif"><font size="2"> <b>odfdom.jar</b> currently the preferred option)<br> - (<u>only</u> versions <b>0.7.5</b>, - <b>0.8.6</b>, <b>0.8.7</b> and <b>0.8.8</b> (the latter from incubator v. 0.5, see download URL below) work OK!) & <b>xercesImpl.jar</b> (watch out here too! only version 2.9.1 (2007-sep-14) works OK with odfdom). Get them here: + (<u>only</u> versions <b>0.7.5</b>, + <b>0.8.6</b>, <b>0.8.7</b> and <b>0.8.8</b> (the latter from incubator v. 0.5, see download URL below) work OK!) & <b>xercesImpl.jar</b> (watch out here too! only version 2.9.1 (2007-sep-14) works OK with odfdom). Get them here: </font></font></p> </li> <ul> @@ -101,15 +101,15 @@ </li><li><p align="left"><a href="http://www.google.com/search?ie=UTF-8&oe=utf-8&q=xerces-2.9.1+download"><font face="Arial, sans-serif"><font size="2">Google for xerces-2.9.1 download</a></p> </li> </ul> -</ul> -<dl><dt><p> +</ul> + <dl><dt><p> <br><font face="Arial, sans-serif"><font size="2">and/or</font></font> -</p></dt></dl> -<ul> - <li> - <p align="left"><font face="Arial, sans-serif"><font size="2"><b>jopendocument</b></font></font><font face="Arial, sans-serif"><font size="2"><version></font></font><font face="Arial, sans-serif"><font size="2"><b>.jar</b></font></font><font face="Arial, sans-serif"><font size="2">. - Get it from <a href="http://www.jopendocument.org/">http://www.jopendocument.org</a></font></font></p><p align="left"> - <font face="Arial, sans-serif"><font size="2">(jOpenDocument 1.2 (final) is the most recent one and recommended for Octave)</font></font> +</p></dt></dl> + <ul> + <li> + <p align="left"><font face="Arial, sans-serif"><font size="2"><b>jopendocument</b></font></font><font face="Arial, sans-serif"><font size="2"><version></font></font><font face="Arial, sans-serif"><font size="2"><b>.jar</b></font></font><font face="Arial, sans-serif"><font size="2">. + Get it from <a href="http://www.jopendocument.org/">http://www.jopendocument.org</a></font></font></p><p align="left"> + <font face="Arial, sans-serif"><font size="2">(jOpenDocument 1.2 (final) is the most recent one and recommended for Octave)</font></font> </p> </li> </ul> @@ -127,231 +127,231 @@ </li> </ul> <dl><dt> - <p><font face="Arial, sans-serif"><font size="2">These class libs must be referenced with - full pathnames in your javaclasspath.<br> + <p><font face="Arial, sans-serif"><font size="2">These class libs must be referenced with + full pathnames in your javaclasspath.<br> Except for the UNO (OOo) classes, the jar files had best be put in /<libdir>/java where <libdir> on Linux is usually /usr/lib; on MinGW it is usually /lib. The PKG_ADD command expects the class libs there; if they are elsewhere, add them in ./share/octave/<version>/m/startup/octaverc using appropriate - javaaddpath statements or a chk_spreadsheet_support() call.</font></font> - </p></dt><dt><p><br> -</p></dt></dl> -<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>USAGE</b></u></font></font></p> - <p><font face="Arial, sans-serif"><font size="2">(see \x93help - ods<function_filename>\x94 in octave terminal.)</font></font></p><p><font face="Arial, sans-serif"><font size="2"><b>odsread</b></font></font> - <font face="Arial, sans-serif"><font size="2">is a sort of analog to - xlsread and works more or less the same. </font></font><font face="Arial, sans-serif"><font size="2"><b>odsread - </b></font></font><font face="Arial, sans-serif"><font size="2">is a - mere wrapper for the functions </font></font><font face="Arial, sans-serif"><font size="2"><b>odsopen</b></font></font><font face="Arial, sans-serif"><font size="2">, - </font></font><font face="Arial, sans-serif"><font size="2"><b>ods2oct,</b></font></font> - <font face="Arial, sans-serif"><font size="2">and </font></font><font face="Arial, sans-serif"><font size="2"><b>odsclose</b></font></font> - <font face="Arial, sans-serif"><font size="2">that do file access and - the actual reading, plus </font></font><font face="Arial, sans-serif"><font size="2"><b>parsecell</b></font></font> - <font face="Arial, sans-serif"><font size="2">for post-processing.</font></font></p><p><font face="Arial, sans-serif"><font size="2"><b>odswrite</b></font></font> - <font face="Arial, sans-serif"><font size="2">works similar to - xlswrite. It too is a wrapper for scripts which do the actual work - and invoke other scripts, a.o. </font></font><font face="Arial, sans-serif"><font size="2"><b>oct2ods</b></font></font><font face="Arial, sans-serif"><font size="2">.</font></font></p><p><font face="Arial, sans-serif"><font size="2"><b>odsfinfo</b></font></font> - <font face="Arial, sans-serif"><font size="2">can be used to explore - odsfiles with unknown content for sheet names and to get an - impression of the data content sizes.</font></font></p><font face="Arial, sans-serif"><font size="2">When you need - data from just one sheet, <b>odsread</b> is for you.</font></font><font face="Arial, sans-serif"><font size="2"> But when you need - data from multiple sheets in the same spreadsheet file, or if you - want to process spreadsheet data by limited-size chunks at a time, - <b>odsopen</b> / <b>ods2oct</b> [/<b>parsecell</b>] / \x85 / - <b>odsclose</b> sequences provides for much more speed and - flexibility as the spreadsheet needs to be read just once rather - than repeatedly for each call to <b>odsread</b>.</font></font><dl><dt><p> - <font face="Arial, sans-serif"><font size="2">Same reasoning goes for - <b>odswrite</b>.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">Also, if you use - <b>odsopen</b> / \x85../, you can process multiple spreadsheets - simultaneously \x96 just use <b>odsopen</b> repeatedly to get - multiple spreadsheet file pointers.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">Moreover, after - adding data to an existing spreadsheet file, you can fiddle with the - filename in the ods file pointer struct to save the data into - another, possibly new spreadsheet file.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">If you use - <b>odsopen</b> / <b>ods2oct</b> / \x85 / <b>oct2ods</b> / \x85. - / <b>odsclose</b>, <b><u><i>DO NOT FORGET</i></u></b> to invoke <b>odsclose</b> in the - end. The file pointers can contain an enormous amount of data and - may needlessly keep precious memory allocated. In case of the UNO interface, the + javaaddpath statements or a chk_spreadsheet_support() call.</font></font> + </p></dt><dt><p><br> + </p></dt></dl> + <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>USAGE</b></u></font></font></p> + <p><font face="Arial, sans-serif"><font size="2">(see \x93help + ods<function_filename>\x94 in octave terminal.)</font></font></p><p><font face="Arial, sans-serif"><font size="2"><b>odsread</b></font></font> + <font face="Arial, sans-serif"><font size="2">is a sort of analog to + xlsread and works more or less the same. </font></font><font face="Arial, sans-serif"><font size="2"><b>odsread + </b></font></font><font face="Arial, sans-serif"><font size="2">is a + mere wrapper for the functions </font></font><font face="Arial, sans-serif"><font size="2"><b>odsopen</b></font></font><font face="Arial, sans-serif"><font size="2">, + </font></font><font face="Arial, sans-serif"><font size="2"><b>ods2oct,</b></font></font> + <font face="Arial, sans-serif"><font size="2">and </font></font><font face="Arial, sans-serif"><font size="2"><b>odsclose</b></font></font> + <font face="Arial, sans-serif"><font size="2">that do file access and + the actual reading, plus </font></font><font face="Arial, sans-serif"><font size="2"><b>parsecell</b></font></font> + <font face="Arial, sans-serif"><font size="2">for post-processing.</font></font></p><p><font face="Arial, sans-serif"><font size="2"><b>odswrite</b></font></font> + <font face="Arial, sans-serif"><font size="2">works similar to + xlswrite. It too is a wrapper for scripts which do the actual work + and invoke other scripts, a.o. </font></font><font face="Arial, sans-serif"><font size="2"><b>oct2ods</b></font></font><font face="Arial, sans-serif"><font size="2">.</font></font></p><p><font face="Arial, sans-serif"><font size="2"><b>odsfinfo</b></font></font> + <font face="Arial, sans-serif"><font size="2">can be used to explore + odsfiles with unknown content for sheet names and to get an + impression of the data content sizes.</font></font></p><font face="Arial, sans-serif"><font size="2">When you need + data from just one sheet, <b>odsread</b> is for you.</font></font><font face="Arial, sans-serif"><font size="2"> But when you need + data from multiple sheets in the same spreadsheet file, or if you + want to process spreadsheet data by limited-size chunks at a time, + <b>odsopen</b> / <b>ods2oct</b> [/<b>parsecell</b>] / \x85 / + <b>odsclose</b> sequences provides for much more speed and + flexibility as the spreadsheet needs to be read just once rather + than repeatedly for each call to <b>odsread</b>.</font></font><dl><dt><p> + <font face="Arial, sans-serif"><font size="2">Same reasoning goes for + <b>odswrite</b>.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">Also, if you use + <b>odsopen</b> / \x85../, you can process multiple spreadsheets + simultaneously \x96 just use <b>odsopen</b> repeatedly to get + multiple spreadsheet file pointers.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">Moreover, after + adding data to an existing spreadsheet file, you can fiddle with the + filename in the ods file pointer struct to save the data into + another, possibly new spreadsheet file.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">If you use + <b>odsopen</b> / <b>ods2oct</b> / \x85 / <b>oct2ods</b> / \x85. + / <b>odsclose</b>, <b><u><i>DO NOT FORGET</i></u></b> to invoke <b>odsclose</b> in the + end. The file pointers can contain an enormous amount of data and + may needlessly keep precious memory allocated. In case of the UNO interface, the hidden OpenOffice.org invocation (soffice.bin) can even block proper closing of - Octave.</font></font></p></dt><dt><br> -</dt></dl> -<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>SPREADSHEET -FORMULA SUPPORT</b></u></font></font></p><dl> - <dt> - <font face="Arial, sans-serif"><font size="2">When using the OTK or UNO - interface you can:</font></font></dt></dl> -<ul> - <li> - <font face="Arial, sans-serif"><font size="2">(When reading, <b>ods2oct</b>) - either read spreadsheet formula results, or the literal formula text - strings;</font></font></li><li> - <font face="Arial, sans-serif"><font size="2">(When writing, <b>oct2ods</b>) - either enter formulas in the worksheet as formulas, or enter them as - literal text strings.</font></font></li></ul> - <font face="Arial, sans-serif"><font size="2">In short, you can - enter spreadsheet formulas and in a later stage read them back, - change them and re-enter them in the worksheet.</font></font><font face="Arial, sans-serif"><font size="2"> The behaviour is - controlled by an option structure </font></font><font face="Arial, sans-serif"><font size="2"><b>options</b></font></font> - <font face="Arial, sans-serif"><font size="2">(as last argument to - </font></font><font face="Arial, sans-serif"><font size="2"><b>oct2ods</b></font></font><font face="Arial, sans-serif"><font size="2">.m - and </font></font><font face="Arial, sans-serif"><font size="2"><b>ods2oct</b></font></font><font face="Arial, sans-serif"><font size="2">.m) - which for now has only one (logical) field:</font></font><ul><li> - <font face="Arial, sans-serif"><font size="2"><b>options.formulas_as_text</b></font></font> - <font face="Arial, sans-serif"><font size="2">= 0 (the default) - implies enter formulas as formulas and read back formula results</font></font></li><li> - <font face="Arial, sans-serif"><font size="2"><b>options.formulas_as_text - </b></font></font><font face="Arial, sans-serif"><font size="2">=1 (or - any positive integer) means enter formulas as text strings and read - them back as text strings.</font></font></li></ul><dl><dt><font face="Arial, sans-serif"><font size="2">Be aware that - there's no formula evaluator in ODS java, not even a formula - validator. So if you create formulas in your spreadsheet using - </font></font><font face="Arial, sans-serif"><font size="2"><b>oct2ods</b></font></font><font face="Arial, sans-serif"><font size="2"> - or </font></font><font face="Arial, sans-serif"><font size="2"><b>odswrite</b></font></font><font face="Arial, sans-serif"><font size="2">, - do not expect meaningful results when reading those files later on - </font></font><font face="Arial, sans-serif"><font size="2"><b>unless</b></font></font> - <font face="Arial, sans-serif"><font size="2">you open them in - OpenOffice.org Calc and write them back to disk.</font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">You can write all kind - of junk as a formula into a spreadsheet cell. There's not much - validity checking built into odfdom.jar. I didn't bother to try - OpenOffice.org Calc to read such faulty spreadsheets, so I don't - know what will happen with spreadsheets containing invalid formulas. - But using the above options, you can at least repair them using - octave....<br> + Octave.</font></font></p></dt><dt><br> + </dt></dl> + <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>SPREADSHEET + FORMULA SUPPORT</b></u></font></font></p><dl> + <dt> + <font face="Arial, sans-serif"><font size="2">When using the OTK or UNO + interface you can:</font></font></dt></dl> + <ul> + <li> + <font face="Arial, sans-serif"><font size="2">(When reading, <b>ods2oct</b>) + either read spreadsheet formula results, or the literal formula text + strings;</font></font></li><li> + <font face="Arial, sans-serif"><font size="2">(When writing, <b>oct2ods</b>) + either enter formulas in the worksheet as formulas, or enter them as + literal text strings.</font></font></li></ul> + <font face="Arial, sans-serif"><font size="2">In short, you can + enter spreadsheet formulas and in a later stage read them back, + change them and re-enter them in the worksheet.</font></font><font face="Arial, sans-serif"><font size="2"> The behaviour is + controlled by an option structure </font></font><font face="Arial, sans-serif"><font size="2"><b>options</b></font></font> + <font face="Arial, sans-serif"><font size="2">(as last argument to + </font></font><font face="Arial, sans-serif"><font size="2"><b>oct2ods</b></font></font><font face="Arial, sans-serif"><font size="2">.m + and </font></font><font face="Arial, sans-serif"><font size="2"><b>ods2oct</b></font></font><font face="Arial, sans-serif"><font size="2">.m) + which for now has only one (logical) field:</font></font><ul><li> + <font face="Arial, sans-serif"><font size="2"><b>options.formulas_as_text</b></font></font> + <font face="Arial, sans-serif"><font size="2">= 0 (the default) + implies enter formulas as formulas and read back formula results</font></font></li><li> + <font face="Arial, sans-serif"><font size="2"><b>options.formulas_as_text + </b></font></font><font face="Arial, sans-serif"><font size="2">=1 (or + any positive integer) means enter formulas as text strings and read + them back as text strings.</font></font></li></ul><dl><dt><font face="Arial, sans-serif"><font size="2">Be aware that + there's no formula evaluator in ODS java, not even a formula + validator. So if you create formulas in your spreadsheet using + </font></font><font face="Arial, sans-serif"><font size="2"><b>oct2ods</b></font></font><font face="Arial, sans-serif"><font size="2"> + or </font></font><font face="Arial, sans-serif"><font size="2"><b>odswrite</b></font></font><font face="Arial, sans-serif"><font size="2">, + do not expect meaningful results when reading those files later on + </font></font><font face="Arial, sans-serif"><font size="2"><b>unless</b></font></font> + <font face="Arial, sans-serif"><font size="2">you open them in + OpenOffice.org Calc and write them back to disk.</font></font></dt><dt> + <font face="Arial, sans-serif"><font size="2">You can write all kind + of junk as a formula into a spreadsheet cell. There's not much + validity checking built into odfdom.jar. I didn't bother to try + OpenOffice.org Calc to read such faulty spreadsheets, so I don't + know what will happen with spreadsheets containing invalid formulas. + But using the above options, you can at least repair them using + octave....<br> The only exception is if you select the UNO interface, as that invokes OpenOffice.org behind the scenes, and OOo obviously has a validator and evaluator built-in.</font></font></dt><dd></dd></dl> - -<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>GOTCHAS</b></u></font></font></p><dl> - <dt><p><font face="Arial, sans-serif"><font size="2">I know of one big - gotcha: i.e. reading dates (& time). A less obvious one is Java - memory pool allocation size.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><b>Date and time - in ODS</b></font></font></p></dt><dt><p> - <font face="Arial, sans-serif"><font size="2">Octave (as does Matlab) - stores dates as a number representing the number of days since - January 1, 0 (and as an aside ignores a.o. Pope Gregorius' - intervention in 1582 when 10 days were simply skipped).</font></font></p></dt><dt><p> - <font face="Arial, sans-serif"><font size="2">OpenOffice.org stores - dates as text strings like \x93yyyy-mm-dd\x94.</font></font></p></dt><dt><p> - <font face="Arial, sans-serif"><font size="2">MS-Excel stores dates as - a number representing the number of days since January 1, 1900 (and - as an aside, erroneously assumes 1900 to be a leap year).</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">Now, converting - OpenOffice.org date cell values (actually, character strings flagged - by \x93date\x94 attributes) into Octave looks pretty - straightforward. But when the ODS spreadsheet was originally an - Excel spreadsheet converted by OpenOffice.org, the date cells can - either be OOo date values (i.e.,strings) OR old numerical values - from the Excel spreadsheet. </font></font> - </p></dt><dt><p><font face="Arial, sans-serif"><font size="2">So: you should - carefully check what happens to date cells.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">As octave has no - \x94date\x94 or \x93time\x94 data type, octave date - values (usually numerical data) are simply transferred as \x93floats\x94 - to ODS spreadsheets. You'll have to convert the values into dates - yourself from within OpenOffice.org.</font></font></p></dt><dt><p> - <font face="Arial, sans-serif"><font size="2">While adding data and - time values has been implemented in the write scripts, the wait is - for clever solutions to distinguish dates from floats in octave cell - arrays.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><b>Java memory - pool allocation size</b></font></font></p></dt><dt><p> - <font face="Arial, sans-serif"><font size="2">The Java virtual machine - (JVM) initializes one big chunk of your computer's RAM in which all - Java classes and methods etc. are to be loaded: the Java memory - pool. It does this because Java has a very sophisticated \x93garbage - collection\x94 system. At least on Windows, the initial size is - 2MB and the maximum size is 64MB. On Linux this allocated size is - much bigger. This part of memory is where the Java-based ODS octave - routines (and the Java-based ods routines) live and keep their - variables etc.</font></font></p></dt><dt><p> - <font face="Arial, sans-serif"><font size="2">For transferring large - pieces of information to and from spreadsheets you might hit the - limits of this pool. E.g. to be able to handle I/O of an array of - around 50,000 cells I needed a memory pool size of 512 MB.</font></font></p></dt><dt><p> - <font face="Arial, sans-serif"><font size="2">The memory size can be - increased by inserting a file called \x93java.opts\x94 - (without quotes) in the directory - ./share/octave/packages/java-<version> (where the script file - javaclasspath.m is located), containing just the following lines:</font></font></p></dt><dt><p> - <font face="Courier New, monospace"><font size="2"><b>-Xms16m<br>-Xmx512m</b></font></font></p></dt><dt><p> - <font face="Arial, sans-serif"><font size="2">(where 16 = initial - size, 512 = maximum size (in this example), m stands for Megabyte. - This number is system-dependent).</font></font></p></dt><dt><p> - <font face="Arial, sans-serif"><font size="2">After processing a large - chunk of spreadsheet information you might notice that octave's - memory footprint does not shrink so it looks like Java's memory pool - does not shrink back; but rest assured, the memory footprint is the - <i>allocated</i> (reserved) memory size, not the actual used size. - After the JVM has done its garbage collection, only the so-called - \x93working set\x94 of the memory allocation is really in use - and that is a trimmed-down part of the memory allocation pool. On - Windows systems it often suffices to minimize the octave terminal - for a few seconds to get a more reasonable memory footprint.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><b>Reading cells - containing errors</b></font></font></p></dt><dt><p> - <font face="Arial, sans-serif"><font size="2">Spreadsheet cells - containing erroneous stuff are transferred to Octave as NaNs. But - not all errors can be catched. Cells showing #Value# in - OpenOffice.org Calc often contain invalid formulas but may have a 0 - (null) value stored in the value fields. It is impossible to catch - this as there is no run-time formula evaluator (yet) in ODF Toolkit - nor jOpenDocument (like there is in Apache POI for Excel).</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">Smaller gotcha's - (only with jOpenDocument 1.2b2, <b>fixed</b> in <b>1.2b3+</b> and - <b>1.2 final</b>):</font></font></p></dt></dl> -<ul> - <li><p align="left"> - <font face="Arial, sans-serif"><font size="2">While reading, empty - cells are sometimes not skipped but interpreted with numerical value - 0 (zero).</font></font></p></li><li><p align="left"> - <font face="Arial, sans-serif"><font size="2">A valid range MUST be - specified, I haven't found a way to discover the actual occupied - rows and columns (jOpenDocument can give the physical ones (= - capacity) but that doesn't help).</font></font></p></li></ul> -<dl> - <dt><p><font face="Arial, sans-serif"><font size="2">NOT fixed in - version 1.2 final nor 1.3b1:</font></font></p></dt></dl> -<ul> - <li><p align="left"> - <font face="Arial, sans-serif"><font size="2">jOpenDocument doesn't - set the so-called <office:value-type='string'> attribute in - cells containing text; as a consequence ODF Toolkit will treat them - as empty cells. Ooo will read them OK.</font></font></p></li></ul> - <p><br> -</p> -<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>MATLAB -COMPATIBILITY</b></u></font></font></p> - <p><font face="Arial, sans-serif"><font size="2">AFAIK there's no - similar functionality in Matlab (yet?), only for reading and then - very limited.<br>o<b>dsread</b> is fairly - function-compatible to <b>xlsread</b>, however.</font></font></p><p><font face="Arial, sans-serif"><font size="2">Same goes for <b>odswrite</b>, - <b>odsfinfo</b> and <b>xlsfinfo</b> \x96 however <b>ods</b><b>f</b><b>info</b> - has better functionality IMO.</font></font></p><br> - -<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>COMPARISON -OF INTERFACES</b></u></font></font></p> - <p><font face="Arial, sans-serif"><font size="2">The <b>ODFtoolkit</b> is - the one that gives the best (but slow) results at present. However, - parsing xml trees into rectangular arrays is not quite - straightforward and the other way round is a real nightmare; - odftoolkit up til 0.7.5. did little to hide the gory details for the - developers.</font></font></p><dl><dt><p> - <font face="Arial, sans-serif"><font size="2">While reading ODS is - still OK, writing implies checking whether cells already exist - explicitly (in table:table-cells) or implicitly (in - number-columns-repeated or number-rows-repeated nodes) or not at all - yet in which case you'll need to add various types of parent nodes. - Inserting new cells (\x93nodes\x94) or deleting nodes implies - rebuilding possibly large parts of the tree in memory - nothing for - the faint-of-heart. Only with ODFToolkit (odfdom) 0.8.6 and 0.8.7 things have - been simplified for developers.</font></font></p></dt> -<dt><p><font face="Arial, sans-serif"><font size="2">The <b>jOpenDocument</b> - interface is more promising, as it does shield the xml tree - details and presents developers something which looks like a - spreadsheet model.<br>However, unfortunately - the developers decided to shield essential methods by making them - 'protected' (e.g. the vital getCellType). JopenDocument does support - writing. But OTOH many obvious methods are still lacking and formula - support is absent.<br>And last (but not least) - the jOpenDocument developers state that their development is - primarily driven by requests from customers who pay for support. I - do sympathize with this business model but for octave needs this may - hamper progress for a while.<br> + + <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>GOTCHAS</b></u></font></font></p><dl> + <dt><p><font face="Arial, sans-serif"><font size="2">I know of one big + gotcha: i.e. reading dates (& time). A less obvious one is Java + memory pool allocation size.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><b>Date and time + in ODS</b></font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">Octave (as does Matlab) + stores dates as a number representing the number of days since + January 1, 0 (and as an aside ignores a.o. Pope Gregorius' + intervention in 1582 when 10 days were simply skipped).</font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">OpenOffice.org stores + dates as text strings like \x93yyyy-mm-dd\x94.</font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">MS-Excel stores dates as + a number representing the number of days since January 1, 1900 (and + as an aside, erroneously assumes 1900 to be a leap year).</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">Now, converting + OpenOffice.org date cell values (actually, character strings flagged + by \x93date\x94 attributes) into Octave looks pretty + straightforward. But when the ODS spreadsheet was originally an + Excel spreadsheet converted by OpenOffice.org, the date cells can + either be OOo date values (i.e.,strings) OR old numerical values + from the Excel spreadsheet. </font></font> + </p></dt><dt><p><font face="Arial, sans-serif"><font size="2">So: you should + carefully check what happens to date cells.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">As octave has no + \x94date\x94 or \x93time\x94 data type, octave date + values (usually numerical data) are simply transferred as \x93floats\x94 + to ODS spreadsheets. You'll have to convert the values into dates + yourself from within OpenOffice.org.</font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">While adding data and + time values has been implemented in the write scripts, the wait is + for clever solutions to distinguish dates from floats in octave cell + arrays.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><b>Java memory + pool allocation size</b></font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">The Java virtual machine + (JVM) initializes one big chunk of your computer's RAM in which all + Java classes and methods etc. are to be loaded: the Java memory + pool. It does this because Java has a very sophisticated \x93garbage + collection\x94 system. At least on Windows, the initial size is + 2MB and the maximum size is 64MB. On Linux this allocated size is + much bigger. This part of memory is where the Java-based ODS octave + routines (and the Java-based ods routines) live and keep their + variables etc.</font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">For transferring large + pieces of information to and from spreadsheets you might hit the + limits of this pool. E.g. to be able to handle I/O of an array of + around 50,000 cells I needed a memory pool size of 512 MB.</font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">The memory size can be + increased by inserting a file called \x93java.opts\x94 + (without quotes) in the directory + ./share/octave/packages/java-<version> (where the script file + javaclasspath.m is located), containing just the following lines:</font></font></p></dt><dt><p> + <font face="Courier New, monospace"><font size="2"><b>-Xms16m<br>-Xmx512m</b></font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">(where 16 = initial + size, 512 = maximum size (in this example), m stands for Megabyte. + This number is system-dependent).</font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">After processing a large + chunk of spreadsheet information you might notice that octave's + memory footprint does not shrink so it looks like Java's memory pool + does not shrink back; but rest assured, the memory footprint is the + <i>allocated</i> (reserved) memory size, not the actual used size. + After the JVM has done its garbage collection, only the so-called + \x93working set\x94 of the memory allocation is really in use + and that is a trimmed-down part of the memory allocation pool. On + Windows systems it often suffices to minimize the octave terminal + for a few seconds to get a more reasonable memory footprint.</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2"><b>Reading cells + containing errors</b></font></font></p></dt><dt><p> + <font face="Arial, sans-serif"><font size="2">Spreadsheet cells + containing erroneous stuff are transferred to Octave as NaNs. But + not all errors can be catched. Cells showing #Value# in + OpenOffice.org Calc often contain invalid formulas but may have a 0 + (null) value stored in the value fields. It is impossible to catch + this as there is no run-time formula evaluator (yet) in ODF Toolkit + nor jOpenDocument (like there is in Apache POI for Excel).</font></font></p></dt><dt><p><font face="Arial, sans-serif"><font size="2">Smaller gotcha's + (only with jOpenDocument 1.2b2, <b>fixed</b> in <b>1.2b3+</b> and + <b>1.2 final</b>):</font></font></p></dt></dl> + <ul> + <li><p align="left"> + <font face="Arial, sans-serif"><font size="2">While reading, empty + cells are sometimes not skipped but interpreted with numerical value + 0 (zero).</font></font></p></li><li><p align="left"> + <font face="Arial, sans-serif"><font size="2">A valid range MUST be + specified, I haven't found a way to discover the actual occupied + rows and columns (jOpenDocument can give the physical ones (= + capacity) but that doesn't help).</font></font></p></li></ul> + <dl> + <dt><p><font face="Arial, sans-serif"><font size="2">NOT fixed in + version 1.2 final nor 1.3b1:</font></font></p></dt></dl> + <ul> + <li><p align="left"> + <font face="Arial, sans-serif"><font size="2">jOpenDocument doesn't + set the so-called <office:value-type='string'> attribute in + cells containing text; as a consequence ODF Toolkit will treat them + as empty cells. Ooo will read them OK.</font></font></p></li></ul> + <p><br> + </p> + <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>MATLAB + COMPATIBILITY</b></u></font></font></p> + <p><font face="Arial, sans-serif"><font size="2">AFAIK there's no + similar functionality in Matlab (yet?), only for reading and then + very limited.<br>o<b>dsread</b> is fairly + function-compatible to <b>xlsread</b>, however.</font></font></p><p><font face="Arial, sans-serif"><font size="2">Same goes for <b>odswrite</b>, + <b>odsfinfo</b> and <b>xlsfinfo</b> \x96 however <b>ods</b><b>f</b><b>info</b> + has better functionality IMO.</font></font></p><br> + + <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>COMPARISON + OF INTERFACES</b></u></font></font></p> + <p><font face="Arial, sans-serif"><font size="2">The <b>ODFtoolkit</b> is + the one that gives the best (but slow) results at present. However, + parsing xml trees into rectangular arrays is not quite + straightforward and the other way round is a real nightmare; + odftoolkit up til 0.7.5. did little to hide the gory details for the + developers.</font></font></p><dl><dt><p> + <font face="Arial, sans-serif"><font size="2">While reading ODS is + still OK, writing implies checking whether cells already exist + explicitly (in table:table-cells) or implicitly (in + number-columns-repeated or number-rows-repeated nodes) or not at all + yet in which case you'll need to add various types of parent nodes. + Inserting new cells (\x93nodes\x94) or deleting nodes implies + rebuilding possibly large parts of the tree in memory - nothing for + the faint-of-heart. Only with ODFToolkit (odfdom) 0.8.6 and 0.8.7 things have + been simplified for developers.</font></font></p></dt> +<dt><p><font face="Arial, sans-serif"><font size="2">The <b>jOpenDocument</b> + interface is more promising, as it does shield the xml tree + details and presents developers something which looks like a + spreadsheet model.<br>However, unfortunately + the developers decided to shield essential methods by making them + 'protected' (e.g. the vital getCellType). JopenDocument does support + writing. But OTOH many obvious methods are still lacking and formula + support is absent.<br>And last (but not least) + the jOpenDocument developers state that their development is + primarily driven by requests from customers who pay for support. I + do sympathize with this business model but for octave needs this may + hamper progress for a while.<br> In addition, jOpenDocument 1.2 and 1.3b1 still have bugs here and there. For one, it doesn't write appropriate OfficeValueType attributes to the cells, so there's no way to reliably read and distinguish boolean, string and integer @@ -386,83 +386,83 @@ <font face="Arial, sans-serif"><font size="2">However, UNO is not stable yet (see below).</font>. </p></dt> </dl> - -<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>TROUBLESHOOTING</b></u></font></font></p><dl> - <dt><p><font face="Arial, sans-serif"><font size="2">Some hints for - troubleshooting ODS support are given here.<br> + + <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>TROUBLESHOOTING</b></u></font></font></p><dl> + <dt><p><font face="Arial, sans-serif"><font size="2">Some hints for + troubleshooting ODS support are given here.<br> Since April 2011 the function chk_spreadsheet_support() has been included in the io package. Calling it with arguments ('', 3) (empty string and debug level 3) will echo a lot of diagnostics to the screen. Large parts of the steps outlined below have been automated in this script.<br> Problems with UNO are too complicated to treat them here; most of the troubleshooting has been implemented in chk_spreadsheet_support.m, only some general guidelines are - given below.</font></font> - </p></dt></dl> -<ol> - <li><p align="left"><font face="Arial, sans-serif"><font size="2">Check - if </font></font><font face="Arial, sans-serif"><font size="2">J</font></font><font face="Arial, sans-serif"><font size="2">ava - works. Do a </font></font><font face="Courier New, monospace"><font size="2">pkg - list </font></font><font face="Arial, sans-serif"><font size="2">and - see</font></font></p><p> - a. <font face="Arial, sans-serif"><font size="2">If there's a </font></font><font face="Arial, sans-serif"><font size="2">J</font></font><font face="Arial, sans-serif"><font size="2">ava - package mentioned (then it's installed). If not, install it.</font></font></p> - <p><font face="Arial, sans-serif"><font size="2">b. If there's an - asterisk on the java package line (then the package is loaded). If - not, do a </font></font><font face="Courier New, monospace"><font size="2">pkg - rebuild-auto java</font></font></p> -</li></ol> - -<ol start="2"> - <li><p align="left"><font face="Arial, sans-serif"><font size="2">Check - </font></font><font face="Arial, sans-serif"><font size="2">J</font></font><font face="Arial, sans-serif"><font size="2">ava - memory settings. Try </font></font><font face="Courier New, monospace"><font size="2">javamem</font></font></p><p> - <font face="Arial, sans-serif"><font size="2">a. If it works, check if - it reports sufficiently large max memory (had better be 200 MiB, the - bigger the better)</font></font></p> - <p align="left"><font face="Arial, sans-serif"><font size="2">b. If it - doesn't work, do:</font></font> - </p><ol type="a"><p align="left"> - <font face="Courier New, monospace"><font size="2">rt = java_invoke - ('java.lang.Runtime', 'getRuntime')</font></font></p><p align="left"> - <font face="Courier New, monospace"><font size="2">rt.gc</font></font></p><p align="left"> - <font face="Courier New, monospace"><font size="2">rt.maxMemory - ().doubleValue () / 1024 / 1024</font></font></p><p align="left"> - <font face="Arial, sans-serif"><font size="2">The last command will - show MaxMemory in MiB.</font></font></p></ol> - <p align="left"><font face="Arial, sans-serif"><font size="2">c. In case - you have insufficient memory, see in \x93GOTCHAS\x94, \x93Java - memory pool allocation size\x94, how to increase java's memory - pre-reservation.</font></font></p></li> - <li><p align="left"><font face="Arial, sans-serif"><font size="2">Check if all classes - (.jarfiles) are in class path. Do a '</font></font><font face="Courier New, monospace"><font size="2">jcp = javaclasspath</font></font><font face="Arial, sans-serif"><font size="2"> (-all)' (under unix/linux, do '</font></font><font face="Courier New, monospace"><font size="2">jcp - = javaclasspath; strsplit (jcp,\x94:\x94)</font></font><font face="Arial, sans-serif"><font size="2">' - (w/o quotes). See above under \x93REQUIRED SUPPORT SOFTWARE\x94 - what classes should be mentioned.</font></font></p> - <p align="left"><font face="Arial, sans-serif"><font size="2">If classes (.jar files) - ar</font></font><font face="Arial, sans-serif"><font size="2">e</font></font><font face="Arial, sans-serif"><font size="2"> - missing, download and put them somewhere and add them to the - javaclass path with their fully qualified pathname (in quotes) using - </font></font><font face="Courier New, monospace"><font size="2">javaaddpath()</font></font><font face="Arial, sans-serif"><font size="2">.</font></font></p></li></ol> - <p><font face="Arial, sans-serif"><font size="2">Once all classes - are present and in the javaclasspath, the ods interfaces should just - work. The only remaining showstoppers are insufficient write - privileges for the working directory, a wrecked up octave or some - other problems outside octave.</font></font></p> -<ol start="4"> - <li><p align="left"><font face="Arial, sans-serif"><font size="2">Try - opening an ods file: </font></font> - </p><p align="left"><font face="Courier New, monospace"><font size="2">ods1 - = odsopen ('test.ods', 1, 'otk')</font></font><font face="Arial, sans-serif"><font size="2">. - If this works and ods1 is a struct with various fields containing - objects, ODF toolkit interface (OTK) works. Do an </font></font><font face="Courier New, monospace"><font size="2">ods1 - = odsclose (ods1)</font></font> <font face="Arial, sans-serif"><font size="2">to - close the file.</font></font></p><p align="left"> - <font face="Courier New, monospace"><font size="2">ods2 = odsopen - ('test.ods', 1, 'jod')</font></font><font face="Arial, sans-serif"><font size="2">. - If this works and ods2 is a struct with various fields containing - objects, jOpenDocument interface (JOD) works as well. Do </font></font><font face="Courier New, monospace"><font size="2">ods2 - = odsclose (ods2)</font></font> <font face="Arial, sans-serif"><font size="2">to - close the file.</font></font></p></li> + given below.</font></font> + </p></dt></dl> + <ol> + <li><p align="left"><font face="Arial, sans-serif"><font size="2">Check + if </font></font><font face="Arial, sans-serif"><font size="2">J</font></font><font face="Arial, sans-serif"><font size="2">ava + works. Do a </font></font><font face="Courier New, monospace"><font size="2">pkg + list </font></font><font face="Arial, sans-serif"><font size="2">and + see</font></font></p><p> + a. <font face="Arial, sans-serif"><font size="2">If there's a </font></font><font face="Arial, sans-serif"><font size="2">J</font></font><font face="Arial, sans-serif"><font size="2">ava + package mentioned (then it's installed). If not, install it.</font></font></p> + <p><font face="Arial, sans-serif"><font size="2">b. If there's an + asterisk on the java package line (then the package is loaded). If + not, do a </font></font><font face="Courier New, monospace"><font size="2">pkg + rebuild-auto java</font></font></p> + </li></ol> + + <ol start="2"> + <li><p align="left"><font face="Arial, sans-serif"><font size="2">Check + </font></font><font face="Arial, sans-serif"><font size="2">J</font></font><font face="Arial, sans-serif"><font size="2">ava + memory settings. Try </font></font><font face="Courier New, monospace"><font size="2">javamem</font></font></p><p> + <font face="Arial, sans-serif"><font size="2">a. If it works, check if + it reports sufficiently large max memory (had better be 200 MiB, the + bigger the better)</font></font></p> + <p align="left"><font face="Arial, sans-serif"><font size="2">b. If it + doesn't work, do:</font></font> + </p><ol type="a"><p align="left"> + <font face="Courier New, monospace"><font size="2">rt = java_invoke + ('java.lang.Runtime', 'getRuntime')</font></font></p><p align="left"> + <font face="Courier New, monospace"><font size="2">rt.gc</font></font></p><p align="left"> + <font face="Courier New, monospace"><font size="2">rt.maxMemory + ().doubleValue () / 1024 / 1024</font></font></p><p align="left"> + <font face="Arial, sans-serif"><font size="2">The last command will + show MaxMemory in MiB.</font></font></p></ol> + <p align="left"><font face="Arial, sans-serif"><font size="2">c. In case + you have insufficient memory, see in \x93GOTCHAS\x94, \x93Java + memory pool allocation size\x94, how to increase java's memory + pre-reservation.</font></font></p></li> + <li><p align="left"><font face="Arial, sans-serif"><font size="2">Check if all classes + (.jarfiles) are in class path. Do a '</font></font><font face="Courier New, monospace"><font size="2">jcp = javaclasspath</font></font><font face="Arial, sans-serif"><font size="2"> (-all)' (under unix/linux, do '</font></font><font face="Courier New, monospace"><font size="2">jcp + = javaclasspath; strsplit (jcp,\x94:\x94)</font></font><font face="Arial, sans-serif"><font size="2">' + (w/o quotes). See above under \x93REQUIRED SUPPORT SOFTWARE\x94 + what classes should be mentioned.</font></font></p> + <p align="left"><font face="Arial, sans-serif"><font size="2">If classes (.jar files) + ar</font></font><font face="Arial, sans-serif"><font size="2">e</font></font><font face="Arial, sans-serif"><font size="2"> + missing, download and put them somewhere and add them to the + javaclass path with their fully qualified pathname (in quotes) using + </font></font><font face="Courier New, monospace"><font size="2">javaaddpath()</font></font><font face="Arial, sans-serif"><font size="2">.</font></font></p></li></ol> + <p><font face="Arial, sans-serif"><font size="2">Once all classes + are present and in the javaclasspath, the ods interfaces should just + work. The only remaining showstoppers are insufficient write + privileges for the working directory, a wrecked up octave or some + other problems outside octave.</font></font></p> + <ol start="4"> + <li><p align="left"><font face="Arial, sans-serif"><font size="2">Try + opening an ods file: </font></font> + </p><p align="left"><font face="Courier New, monospace"><font size="2">ods1 + = odsopen ('test.ods', 1, 'otk')</font></font><font face="Arial, sans-serif"><font size="2">. + If this works and ods1 is a struct with various fields containing + objects, ODF toolkit interface (OTK) works. Do an </font></font><font face="Courier New, monospace"><font size="2">ods1 + = odsclose (ods1)</font></font> <font face="Arial, sans-serif"><font size="2">to + close the file.</font></font></p><p align="left"> + <font face="Courier New, monospace"><font size="2">ods2 = odsopen + ('test.ods', 1, 'jod')</font></font><font face="Arial, sans-serif"><font size="2">. + If this works and ods2 is a struct with various fields containing + objects, jOpenDocument interface (JOD) works as well. Do </font></font><font face="Courier New, monospace"><font size="2">ods2 + = odsclose (ods2)</font></font> <font face="Arial, sans-serif"><font size="2">to + close the file.</font></font></p></li> <li><p align="left"><font face="Arial, sans-serif"><font size="2">For the UNO interface, at least version 1.2.8 of the Java package is needed plus the following @@ -479,20 +479,20 @@ to add one or more of these these classes manually to the javaclasspath. </font></font></font></p></li> </ol> -<p><br> -</p> -<p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>DEVELOPMENT</b></u></font></font></p> - <p><font face="Arial, sans-serif"><font size="2">As with the Excel - r/w stuff, adding new interfaces should be easy and straightforward. - Add relevant stanzas in <b>odsopen</b>, <b>odsclose, odsfinfo</b> & - <b>getusedrange</b> and add new subfunctions (for the real work) to - <b>getusedrange_</b><INTF>, <b>oct2ods</b> and <b>ods2oct</b>.</font></font></p><p><font face="Arial, sans-serif"><font size="2">Suggestions for - future development:</font></font></p> - <ul><li><font face="Arial, sans-serif"><font size="2">Reliable and easy ODS - write support (maybe when jOpenDocument is more mature)</font></font></li></ul><ul><li><p align="left"> - <font face="Arial, sans-serif"><font size="2">Speeding up (ODS is 10 X - slower than e.g. OOXML !!!). jOpenDocument is much faster but still - immature.<br> +<p><br> + </p> + <p align="center"><font face="Arial, sans-serif"><font size="4"><u><b>DEVELOPMENT</b></u></font></font></p> + <p><font face="Arial, sans-serif"><font size="2">As with the Excel + r/w stuff, adding new interfaces should be easy and straightforward. + Add relevant stanzas in <b>odsopen</b>, <b>odsclose, odsfinfo</b> & + <b>getusedrange</b> and add new subfunctions (for the real work) to + <b>getusedrange_</b><INTF>, <b>oct2ods</b> and <b>ods2oct</b>.</font></font></p><p><font face="Arial, sans-serif"><font size="2">Suggestions for + future development:</font></font></p> + <ul><li><font face="Arial, sans-serif"><font size="2">Reliable and easy ODS + write support (maybe when jOpenDocument is more mature)</font></font></li></ul><ul><li><p align="left"> + <font face="Arial, sans-serif"><font size="2">Speeding up (ODS is 10 X + slower than e.g. OOXML !!!). jOpenDocument is much faster but still + immature.<br> <b>UNO</b> *is* MUCH faster than jOpenDocument but starting up OpenOffice.org for the first time can take tens of seconds...<br> Note that UNO is still experimental. The issue is that odsclose() will simply @@ -503,66 +503,66 @@ wait for OOo to shut down before it can terminate itself. So Octave must kill OOo to be able to terminate.<br> A way out hasn't been found yet. - </font></font></p></li><li><p align="left"> - \x93<font face="Arial, sans-serif"><font size="2">Passing function - handle\x94 a la Matlab's </font></font><font face="Arial, sans-serif"><font size="2"><b>xlsread</b></font></font></p></li><li><p align="left"> - <font face="Arial, sans-serif"><font size="2">Adding styles (borders, - cell lay-out, font, etc.)</font></font></p></li></ul> - <font face="Arial, sans-serif"><font size="2">Some notes on the - choice for Java:</font></font> -<ol> - <li> - <font face="Arial, sans-serif"><font size="2">It saves a LOT of - development time to use ready-baked Java classes rather than - developing your own routines and thus effectively reinvent the - wheel.</font></font></li><li> - <font face="Arial, sans-serif"><font size="2">A BIG advantage is that - a Java-based solution is platform-independent (\x93portable\x94).</font></font></li><li> - <font face="Arial, sans-serif"><font size="2">But Java is known to be - not very conservative with resources, especially not when processing - XML-based formats.</font></font></li></ol> -<dl> - <dt><font face="Arial, sans-serif"><font size="2">So Java is a - compromise between portability and rapid development time versus - capacity (and speed).</font></font></dt><dt> - <font face="Arial, sans-serif"><font size="2">But IMO data sets larger - than 5.10<sup>5</sup> cells should not be kept in spreadsheets - anyway. Use real databases for such data sets.</font></font></dt><dt> - <br> - </dt><dt><font face="Arial, sans-serif"><font size="2"><b>ODFDOM versions</b></font></font></dt><dt> - <br> - </dt><dt><font face="Arial, sans-serif"><font size="2">I have tried various - odfdom version. As to 0.8 & 0.8.5, while the API has been - simplified enormously (finally one can address cells by spreadsheet - address rather than find out yourself by parsing the - table-column/-row/-cell structure), many irrecoverable bugs have - been introduced :-(( </font></font> - </dt><dt><font face="Arial, sans-serif"><font size="2">In addition - processing ODS files became significantly slower (up to 7 times!).</font></font></dt><dt> - <br> - </dt><dt><font face="Arial, sans-serif"><font size="2">End of August 2010 I - have implemented support for odfdom-0.8.6.jar \x96 that version - is at last sufficiently reliable to use. The few remaining bugs and - limitations could easily be worked around by diving in the older - TableTable API. Later on (early 2011) version 0.8.7 has been tested + </font></font></p></li><li><p align="left"> + \x93<font face="Arial, sans-serif"><font size="2">Passing function + handle\x94 a la Matlab's </font></font><font face="Arial, sans-serif"><font size="2"><b>xlsread</b></font></font></p></li><li><p align="left"> + <font face="Arial, sans-serif"><font size="2">Adding styles (borders, + cell lay-out, font, etc.)</font></font></p></li></ul> + <font face="Arial, sans-serif"><font size="2">Some notes on the + choice for Java:</font></font> + <ol> + <li> + <font face="Arial, sans-serif"><font size="2">It saves a LOT of + development time to use ready-baked Java classes rather than + developing your own routines and thus effectively reinvent the + wheel.</font></font></li><li> + <font face="Arial, sans-serif"><font size="2">A BIG advantage is that + a Java-based solution is platform-independent (\x93portable\x94).</font></font></li><li> + <font face="Arial, sans-serif"><font size="2">But Java is known to be + not very conservative with resources, especially not when processing + XML-based formats.</font></font></li></ol> + <dl> + <dt><font face="Arial, sans-serif"><font size="2">So Java is a + compromise between portability and rapid development time versus + capacity (and speed).</font></font></dt><dt> + <font face="Arial, sans-serif"><font size="2">But IMO data sets larger + than 5.10<sup>5</sup... [truncated message content] |