From: <prn...@us...> - 2009-12-30 15:10:44
|
Revision: 6681 http://octave.svn.sourceforge.net/octave/?rev=6681&view=rev Author: prnienhuis Date: 2009-12-30 15:10:35 +0000 (Wed, 30 Dec 2009) Log Message: ----------- ODS read support was already there. Now I added some html documentation. Added Paths: ----------- trunk/octave-forge/main/io/doc/READ-ODS.html Added: trunk/octave-forge/main/io/doc/READ-ODS.html =================================================================== --- trunk/octave-forge/main/io/doc/READ-ODS.html (rev 0) +++ trunk/octave-forge/main/io/doc/READ-ODS.html 2009-12-30 15:10:35 UTC (rev 6681) @@ -0,0 +1,304 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<HTML> +<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="AUTHOR" CONTENT="Philip Nienhuis"> + <META NAME="CREATED" CONTENT="20091229;22213000"> + <META NAME="CHANGEDBY" CONTENT="Philip Nienhuis"> + <META NAME="CHANGED" CONTENT="20091229;23412000"> + <META NAME="Info 1" CONTENT=""> + <META NAME="Info 2" CONTENT=""> + <META NAME="Info 3" CONTENT=""> + <META NAME="Info 4" CONTENT=""> + <STYLE TYPE="text/css"> + <!-- + @page { margin: 0.79in } + P { margin-bottom: 0.08in } + 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=4 STYLE="font-size: 16pt"><U><B>ODS +support for Octave</B></U></FONT></FONT></P> +<P ALIGN=CENTER STYLE="margin-bottom: 0in"><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> +<P ALIGN=CENTER STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2>This +version December 29, 2009</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 += 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> +<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"><U><B>Files +content</B></U></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +</P> +<P ALIGN=LEFT STYLE="margin-left: 1.98in; text-indent: -1.98in; margin-bottom: 0in"> +<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 +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> +<P ALIGN=LEFT STYLE="margin-left: 1.98in; text-indent: -1.98in; margin-bottom: 0in"> +<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"> +<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> +<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 +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> +<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 +file handle made by odsopen.</FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><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 +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> +<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 +function needed for jOpenDocument class.</FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><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 +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> +<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in"><BR> +</P> +<P ALIGN=CENTER STYLE="margin-left: 0.01in; margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><FONT SIZE=4 STYLE="font-size: 15pt"><U><B>REQUIRED +SUPPORT SOFTWARE</B></U></FONT></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-left: 1.98in; text-indent: -1.98in; margin-bottom: 0in"> +<BR> +</P> +<P ALIGN=LEFT STYLE="margin-left: 1.98in; text-indent: -1.98in; margin-bottom: 0in"> +<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 + with java package (>= 1.2.6)</FONT></FONT></P> +</UL> +<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 +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 + with java package (>= 1.2.5; earlier versions not tested)</FONT></FONT></P> + <P ALIGN=LEFT STYLE="margin-bottom: 0in"></P> +</UL> +<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> +<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"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><A HREF="http://odftoolkit.org/projects/odfdom/downloads/directory/current-version">http://odftoolkit.org/projects/odfdom/downloads/directory/current-version</A></FONT></FONT></P> + <LI><P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><A HREF="http://xerces.apache.org/mirrors.cgi">http://xerces.apache.org/mirrors.cgi</A></FONT></FONT></P> +</UL> +<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">and/or</FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><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">. + 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> +<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/octavercusing appropriate + javaaddpath statements.</SPAN></FONT></FONT></P> +</UL> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +</P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><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> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">(see +“help ods<function_filename>” in octave terminal.)</SPAN></SPAN></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +</P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><B><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none">odsread</SPAN></FONT></FONT></B><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal"> +is a sort of analog to xlsread and works more or less the same. +</SPAN></SPAN></FONT></FONT><B><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none">odsread +</SPAN></FONT></FONT></B><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">is +a mere wrapper for the functions </SPAN></SPAN></FONT></FONT><B><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none">odsopen</SPAN></FONT></FONT></B><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">,</SPAN></SPAN></FONT></FONT><B><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none">ods2oct,</SPAN></FONT></FONT></B><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal"> +and </SPAN></SPAN></FONT></FONT><B><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none">odsclos</SPAN></FONT></FONT></B><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">e +that do file access and the actual reading, plus </SPAN></SPAN></FONT></FONT><B><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none">parsecell</SPAN></FONT></FONT></B><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal"> +for post-processing.</SPAN></SPAN></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +</P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><B><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none">odsfinfo</SPAN></FONT></FONT></B><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><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></SPAN></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"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">When +you need data from just one sheet, odsread is for you. </SPAN></SPAN></FONT></FONT> +</P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">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, odsopen / ods2oct [/parsecell] / … / odsclose +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.</SPAN></SPAN></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"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">Also, +if you use odsopen / …../, you can process multiple +spreadsheets simultaneously – just use odsopen repeatedly to +get multiple spreadsheet file pointers.</SPAN></SPAN></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"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">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 unneededly keep precious memory allocated.</SPAN></SPAN></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><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> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">I +know of one big gotcha: reading dates (& time).</SPAN></SPAN></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"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">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).</SPAN></SPAN></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">OpenOffice.org +stores dates as text strings like “yyyy-mm-dd”.</SPAN></SPAN></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">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).</SPAN></SPAN></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"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">Now, +converting OpenOffice.org date cell values 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. </SPAN></SPAN></FONT></FONT> +</P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">So: +you should carefully check what happens to date cells.</SPAN></SPAN></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +</P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><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 +COMPATIBILITY</B></U></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"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">AFAIK +there's no similar functionality in Matlab (yet?).</SPAN></SPAN></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">odsread +is compatible to xlsread, however. </SPAN></SPAN></FONT></FONT> +</P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">Same +goes for odsfinfo and xlsfinfo – however odsinfo has better +functionality IMO.</SPAN></SPAN></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +</P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><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 +OF INTERFACES</B></U></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"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">The +ODFtoolkit (& associated xerces) interface is the one that gives +the best results at present. However, parsing xml trees into +rectangular arrays can be a nightmare and odftoolkit does little to +hide the gory details for the developers. </SPAN></SPAN></FONT></FONT> +</P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">Reading +is still OK, but 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 +rebuilding possibly large parts of the tree in memory - nothing for +the faint-of-heart. And odftoolkit lets you sort out most of this all +by yourself.</SPAN></SPAN></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"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">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.</SPAN></SPAN></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">However, +unfortunately the developers decided to shield essential methods by +making them 'protected' (e.g. the vital getCellType). Extracting +sheet names is not implemented (yet).</SPAN></SPAN></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">JopenDocument +does support writing, however I couldn't reliably create new +MutableCells beyond column 1 no matter how hard I tried. So there's +still bugs.</SPAN></SPAN></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">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 shuts the door for some time to come.</SPAN></SPAN></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +</P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><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> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT SIZE=4 STYLE="font-size: 15pt"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">As +with the Excel r/w stuff, adding new interfaces should be easy and +straightforward.</SPAN></SPAN></FONT></FONT></FONT></P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><BR> +</P> +<P ALIGN=LEFT STYLE="margin-bottom: 0in"><FONT SIZE=4 STYLE="font-size: 15pt"><FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="text-decoration: none"><SPAN STYLE="font-weight: normal">Suggestions +for future development:</SPAN></SPAN></FONT></FONT></FONT></P> +<UL> + <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">ODS + write support (maybe when jOpenDocument is more mature)</SPAN></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">Speeding + up</SPAN></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> +<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in; text-decoration: none"> +<BR> +</P> +<P ALIGN=LEFT STYLE="margin-left: 0.01in; margin-bottom: 0in; text-decoration: none"> +<FONT FACE="Arial, sans-serif"><FONT SIZE=2 STYLE="font-size: 11pt"><SPAN STYLE="font-weight: normal">Enjoy!</SPAN></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. |