Mercurial > forge
changeset 9589:3a4a8c3be21d octave-forge
Updated texinfo help text
author | prnienhuis |
---|---|
date | Wed, 07 Mar 2012 19:35:08 +0000 |
parents | 4a591b303d4b |
children | 10592d0447cb |
files | main/io/inst/oct2ods.m main/io/inst/oct2xls.m main/io/inst/odsread.m main/io/inst/odswrite.m main/io/inst/xlsread.m main/io/inst/xlswrite.m |
diffstat | 6 files changed, 78 insertions(+), 65 deletions(-) [+] |
line wrap: on
line diff
--- a/main/io/inst/oct2ods.m Wed Mar 07 19:09:25 2012 +0000 +++ b/main/io/inst/oct2ods.m Wed Mar 07 19:35:08 2012 +0000 @@ -30,8 +30,9 @@ ## odsclose is needed to write the updated spreadsheet to disk (and ## -if needed- close the Java invocation holding the file pointer). ## -## @var{arr} can be any array type save complex. Mixed numeric/text arrays -## can only be cell arrays. +## @var{arr} can be any 1D or 2D array containing numerical or character +## data (cellstr) except complex. Mixed numeric/text arrays can only be +## cell arrays. ## ## @var{ods} must be a valid pointer struct created earlier by odsopen. ## @@ -114,6 +115,7 @@ ## 2012-01-26 Fixed "seealso" help string ## 2012-02-20 Fixed range parameter to be default empty string rather than empty numeral ## 2012-02-27 More range arg fixes +## 2012-03-07 Updated texinfo help text ## ## Last update of subfunctions below: 2012-02-26 @@ -237,11 +239,11 @@ ## 2010-03-08 Some comment lines adapted ## 2010-03-25 Try-catch added f. unpatched-for-booleans java-1.2.6 / 1.2.7 package ## 2010-04-11 Changed all references to "cell" to "scell" to avoid reserved keyword -## " Small bugfix for cases with empty left columns (wrong cell reference) +## '' Small bugfix for cases with empty left columns (wrong cell reference) ## 2010-04-13 Fixed bug with stray cell copies beyond added data rectangle ## 2010-07-29 Added formula input support (based on xls patch by Benjamin Lindner) ## 2010-08-01 Added try-catch around formula input -## " Changed range arg to also allow just topleft cell +## '' Changed range arg to also allow just topleft cell ## 2010-08-03 Moved range checks and type array parsing to separate functions ## 2010-08-13 Fixed empty Sheet1 in case of new spreadsheets, fix input text sheet name ## 2010-10-27 Improved file change tracking tru ods.changed @@ -872,11 +874,11 @@ ## 2010-06-01 Checked logic. AFAICS all should work with upcoming jOpenDocument 1.2b4; ## in 1.2b3 adding a newsheet always leaves an incomplete upper row; ## supposedly (hopefully) that will be fixed in 1.2b4. -## " Added check for jOpenDocument version. Adding sheets only works for +## '' Added check for jOpenDocument version. Adding sheets only works for ## 1.2b3+ (barring bug above) ## 2010-06-02 Fixed first sheet remaining in new spreadsheets ## 2010-08-01 Added option for crange to be only topleft cell address -## " Code cleanup +## '' Code cleanup ## 2010-08-13 Fixed bug of ignoring text sheet name in case of new spreadsheet ## 2010-08-15 Fixed bug with invalid first sheet in new spreadsheets ## 2010-10-27 Improved file change tracking tru ods.changed
--- a/main/io/inst/oct2xls.m Wed Mar 07 19:09:25 2012 +0000 +++ b/main/io/inst/oct2xls.m Wed Mar 07 19:35:08 2012 +0000 @@ -29,8 +29,9 @@ ## A subsequent call to xlsclose is needed to write the updated spreadsheet ## to disk (and -if needed- close the Excel or Java invocation). ## -## @var{arr} can be any array type save complex. Mixed numeric/text arrays -## can only be cell arrays. +## @var{arr} can be any 1D or 2D array containing numerical or character +## data (cellstr) except complex. Mixed numeric/text arrays can only be +## cell arrays. ## ## @var{xls} must be a valid pointer struct created earlier by xlsopen. ## @@ -93,8 +94,8 @@ ## 2010-03-14 Updated help text section on java memory usage ## 2010-07-27 Added formula writing support (based on patch by Benjamin Lindner) ## 2010-08-01 Added check on input array size vs. spreadsheet capacity -## " Changed argument topleft into range (now compatible with ML); the -## " old argument version (just topleft cell) is still recognized, though +## '' Changed argument topleft into range (now compatible with ML); the +## '' old argument version (just topleft cell) is still recognized, though ## 2010-08014 Added char array conversion to 1x1 cell for character input arrays ## 2010-08-16 Added check on presence of output argument. Made wsh = 1 default ## 2010-08-17 Corrected texinfo ("topleft" => "range") @@ -110,6 +111,7 @@ ## 2012-01-26 Fixed "seealso" help string ## 2012-02-20 Fixed range parameter to be default empty string rather than empty numeral ## 2012-02-27 More range param fixes +## 2012-03-07 Updated texinfo help text ## Last script file update (incl. subfunctions): 2012-02-26 @@ -238,18 +240,18 @@ ## 2010-01-13 Removed an extraneous statement used for debugging ## I plan look at it when octave v.3.4 is about to arrive. ## 2010-08-01 Added checks for input array size vs check on capacity -## " Changed topleft arg into range arg (just topleft still recognized) -## " Some code cleanup -## " Added option for formula input as text string +## '' Changed topleft arg into range arg (just topleft still recognized) +## '' Some code cleanup +## '' Added option for formula input as text string ## 2010-08-01 Added range vs. array size vs. capacity checks ## 2010-08-03 Moved range checks and type array parsing to separate functions ## 2010-10-20 Bug fix removing new empty sheets in new workbook that haven't been ## created in the first place due to Excel setting (thanks Ian Journeaux) -## " Changed range use in COM transfer call +## '' Changed range use in COM transfer call ## 2010-10-21 Improved file change tracking (var xls.changed) ## 2010-10-24 Fixed bug introduced in above fix: for loops have no stride param, -## " replaced by while loop -## " Added check for "live" ActiveX server +## '' replaced by while loop +## '' Added check for "live" ActiveX server ## 2010-11-12 Moved ptr struct check into main func ## 2012-01-26 Fixed "seealso" help string ## 2012-02-27 Copyright strings updated @@ -638,8 +640,8 @@ ## Added check for valid file pointer struct ## 2010-08-01 Improved try-catch for formulas to enter wrong formulas as text strings ## 2010-08-01 Added range vs. array size vs. capacity checks -## " Code cleanup -## " Changed topleft arg into range arg (topleft version still recognized) +## '' Code cleanup +## '' Changed topleft arg into range arg (topleft version still recognized) ## 2010-08-03 Moved range checks and cell type parsing to separate routines ## 2010-08-11 Moved addcell() into try-catch as it is addCell which throws fatal errors ## 2010-10-20 Improved logic for tracking file changes (xls.changed 2 or 3); dropped
--- a/main/io/inst/odsread.m Wed Mar 07 19:09:25 2012 +0000 +++ b/main/io/inst/odsread.m Wed Mar 07 19:35:08 2012 +0000 @@ -24,8 +24,10 @@ ## in OpenOffice_org Calc spreadsheet file @var{filename}. ## ## You need the octave-forge java package (> 1.2.6) and one or both of -## jopendocument-<version>.jar or preferrably: (odfdom.jar (version 0.7.5 -#3 or 0.8.6) & xercesImpl.jar) in your javaclasspath. +## jopendocument-<version>.jar or preferrably: (odfdom.jar (versions +## 0.7.5, 0.8.6 or 0.8.7) & xercesImpl.jar v. 2.9.1) in your javaclasspath. +## There is also experimental support invoking OpenOffice.org or clones +## through Java/UNO bridge. ## ## Return argument @var{numarr} contains the numeric data, optional ## return arguments @var{txtarr} and @var{rawarr} contain text strings @@ -59,8 +61,8 @@ ## ## The optional last argument @var{reqintf} can be used to override ## the automatic selection by odsread of one interface out of the -## supported ones: Java/ODFtoolkit ('OTK') or Java/jOpenDocument -## ('JOD'). +## supported ones: Java/ODFtoolkit ('OTK'), Java/jOpenDocument +## ('JOD') or Java/UNO bridge ('UNO'). ## ## Erroneous data and empty cells are set to NaN in @var{numarr} and ## turn up empty in @var{txtarr} and @var{rawarr}. Date/time values @@ -116,6 +118,7 @@ ## 2011-09-08 Catch empty ods structs after failed odsopen attempts ## 2011-09-18 Return empty output arg in case of empty rawarr ## 2012-01-26 Fixed "seealso" help string +## 2012-03-07 Updated texinfo help text function [ numarr, txtarr, rawarr, lim ] = odsread (filename, wsh=1, datrange=[], reqintf=[])
--- a/main/io/inst/odswrite.m Wed Mar 07 19:09:25 2012 +0000 +++ b/main/io/inst/odswrite.m Wed Mar 07 19:35:08 2012 +0000 @@ -28,8 +28,9 @@ ## file name extension). If @var{filename} does not contain any directory ## path, the file is saved in the current directory. ## -## @var{arr} can be any array type save complex. Mixed numeric/text arrays -## can only be cell arrays. +## @var{arr} can be any 1D or 2D array containing numerical or character +## data (cellstr) except complex. Mixed numeric/text arrays can only be +## cell arrays. ## ## @var{wsh} can be a number or string. In case of a not yet existing ## OpenOffice.org spreadsheet, the first sheet will be used & named @@ -48,7 +49,8 @@ ## Array @var{arr} will be clipped at the right and/or bottom if its size ## is bigger than can be accommodated in @var{range}. ## If @var{arr} is smaller than the @var{range} allows, it is placed -## in the top left of @var{range}. +## in the top left rectangle of @var{range} and cell values outside that +## rectangle will be untouched. ## ## If @var{range} contains merged cells, only the elements of @var{arr} ## corresponding to the top or left Calc cells of those merged cells @@ -92,6 +94,7 @@ ## 2011-09-08 Minor filename error text adaptation ## 2012-01-26 Fixed "seealso" help string ## 2012-02-20 Fixed range parameter to be default empty string rather than empty numeral +## 2010-03-07 Updated texinfo help text function [ rstatus ] = odswrite (filename, data, wsh=1, crange='', reqintf=[])
--- a/main/io/inst/xlsread.m Wed Mar 07 19:09:25 2012 +0000 +++ b/main/io/inst/xlsread.m Wed Mar 07 19:35:08 2012 +0000 @@ -25,11 +25,7 @@ ## in Excel spreadsheet file @var{filename}. ## Return argument @var{numarr} contains the numeric data, optional ## return arguments @var{txtarr} and @var{rawarr} contain text strings -## and the raw spreadsheet cell data, respectively. -## -## If neither Excel, Java/Apache POI or Java/JExcelAPI are installed, -## xlsread will fail and suggest .csv file reading. -## +## and the raw spreadsheet cell data, respectively. Return argument ## @var{limits} contains the outer column/row numbers of the read ## spreadsheet range where @var{numarr}, @var{txtarr} and @var{rawarr} ## have come from (remember, xlsread trims outer rows and columns). @@ -37,16 +33,15 @@ ## If @var{filename} does not contain any directory, the file is ## assumed to be in the current directory. The filename extension ## (.xls or .xlsx) must be included in the file name; when using the -## COM interface any file format can be read from that can be read -## and written by the locally installed MS-Excel version (e.g., wk1, -## csv, dbf, ...). +## COM interface all file formats can be read that are supported by the +## locally installed MS-Excel version (e.g., wk1, csv, dbf, etc.). ## ## @var{range} is expected to be a regular spreadsheet range format, ## or "" (empty string, indicating all data in a worksheet). ## If no range is specified the occupied cell range will have to be ## determined behind the scenes first; this can take some time for the -## Java-based interfaces (but the results are more reliable than that -## of ActiveX/COM). +## Java-based interfaces (but the results may be more reliable than +## that of ActiveX/COM). ## ## @var{wsh} is either numerical or text; in the latter case it is ## case-sensitive and it may be max. 31 characters long. @@ -56,12 +51,12 @@ ## in the Excel file. ## ## If only the first argument is specified, xlsread will try to read -## all contents from the first = leftmost (or the only) worksheet (as -## if a range of @'' (empty string) was specified). +## all contents (as if a range of @'' (empty string) was specified) +## from the first = leftmost (or the only) worksheet ## ## If only two arguments are specified, xlsread assumes the second ## argument to be @var{range} if it is a string argument and contains -## a ":" or if it is @'' (empty string) and in those cases assumes +## a ":" or if it is @'' (empty string), and in those cases assumes ## the data must be read from the first worksheet (not necessarily ## Sheet1! but the leftmost sheet). ## @@ -71,13 +66,13 @@ ## xlsread tries to read all data contained in that worksheet. ## ## The optional last argument @var{reqintf} can be used to override -## the automatic selection by xlsread of one interface out of the -## supported ones: COM/Excel, Java/Apache POI, or Java/JExcelAPI -## (in that built-in order of preference). -## For reading from OOXML files a value of 'poi' or 'uno' must be specified -## for @var{reqintf} (see help for xlsopen); for Excel'95 files use -## 'com', or if Excel is not installed use 'jxl', 'basic', or 'uno' (POI -## can't read Excel 95 but will try to fall back to JXL). +## the automatic interface selection by xlsread out of the supported +## ones: COM/Excel, Java/Apache POI, Java/JExcelAPI, Java/OpenXLS, or +## Java/UNO (OpenOffice.org) (in that -built in- order of preference). +## For reading from OOXML files a value of 'com', 'poi' or 'uno' must +## be specified for @var{reqintf} (see help for xlsopen); for Excel'95 +## files use 'com', or if Excel is not installed use 'jxl', 'basic' +## or 'uno' (POI can't read Excel 95 but will try to fall back to JXL). ## As @var{reqintf} can also be a cell array of strings, one can ## select or exclude one or more interfaces. ## @@ -85,7 +80,8 @@ ## turn up empty in @var{txtarr} and @var{rawarr}. Date/time values in ## Excel are returned as numerical values in @var{numarr}. Note that ## Excel and Octave have different date base values (1/1/1900 & -## 1/1/0000, resp.) +## 1/1/0000, resp.). Spreadsheet date values lying before 1/1/1900 are +## returned as strings, formatted as they appear in the spreadsheet. ## @var{numarr} and @var{txtarr} are trimmed from empty outer rows ## and columns. Be aware that Excel does the same for @var{rawarr}, ## so any returned array may turn out to be smaller than requested in @@ -96,11 +92,11 @@ ## "corresponding" Excel cells are empty. ## ## xlsread is just a wrapper for a collection of scripts that find out -## the interface to be used (COM, Java/POI, Java/JXL) and do the actual -## reading. For each call to xlsread the interface must be started and -## the Excel file read into memory. When reading multiple ranges (in -## optionally multiple worksheets) a significant speed boost can be -## obtained by invoking those scripts directly as in: +## the interface to be used (COM, Java/POI, Java/JXL Java/OXS, Java/UNO) +## and do the actual reading. For each call to xlsread the interface must +## be started and the Excel file read into memory. When reading multiple +## ranges (in optionally multiple worksheets) a significant speed boost +## can be obtained by invoking those scripts directly as in: ## xlsopen / xls2oct [/ parsecell] / ... / xlsclose ## ## Beware: when using the COM interface, hidden Excel invocations may be @@ -138,7 +134,7 @@ ## 2010-01-12 added unwind_protect to get rid of stray Excel invocations i.c.o. COM errors ## 2010-05-31 Updated help text (delays i.c.o. empty range due to getusedrange call) ## 2010-08-18 Added check for existence of xls after call to xlsopen to -## " avoid unneeded error message clutter +## '' avoid unneeded error message clutter ## 2010-08-25 Improved help text, esp. sections Excel file types and interfaces ## 2010-10-20 Dropped wiping xls.limits for COM (nowadays COM can return those) ## 2010-10-21 Formally added 'BASIC' option as synonym for 'JXL' @@ -148,6 +144,7 @@ ## 2011-04-17 Suppress xlsopen messages (";" was missing) ## 2011-09-08 Minor code cleanup; included UNO & OXS support in test ## 2012-01-26 Fixed "seealso" help string +## 2012-03-07 Updated texinfo help header function [ numarr, txtarr, rawarr, lims ] = xlsread (fn, wsh, datrange, reqintf=[])
--- a/main/io/inst/xlswrite.m Wed Mar 07 19:09:25 2012 +0000 +++ b/main/io/inst/xlswrite.m Wed Mar 07 19:35:08 2012 +0000 @@ -28,18 +28,20 @@ ## name extension). If @var{filename} does not contain any directory path, ## the file is saved in the current directory. ## -## @var{arr} can be any array type save complex. Mixed numeric/text arrays -## can only be cell arrays. +## @var{arr} can be any 1D or 2D array containing numerical or character +## data (cellstr) except complex. Mixed numeric/text arrays can only be +## cell arrays. ## ## If only 3 arguments are given, the 3rd is assumed to be a spreadsheet ## range if it contains a ":" or is a completely empty string (corresponding -## to A1:IV65336). The 3rd argument is assumed to refer to a worksheet if -## it is a numeric value or a non-empty text string not containing ":" +## to A1:IV65336 for regular .xls or A1:XFD1048576 for OOXML .xlsx). The +## 3rd argument is assumed to refer to a worksheet if it is a numeric value +## or a non-empty text string not containing ":" ## ## @var{wsh} can be a number or string (max. 31 chars). ## In case of a not yet existing Excel file, the first worksheet will be ## used & named according to @var{wsh} - the extra worksheets that Excel -## creates by default are deleted. +## normally creates by default are deleted. ## In case of existing files, some checks are made for existing worksheet ## names or numbers, or whether @var{wsh} refers to an existing sheet with ## a type other than worksheet (e.g., chart). @@ -53,7 +55,8 @@ ## Array @var{arr} will be clipped at the right and/or bottom if its size ## is bigger than can be accommodated in @var{range}. ## If @var{arr} is smaller than the @var{range} allows, it is placed -## in the top left of @var{range}. +## in the top left rectangle of @var{range} and remaining cell values +## outside the rectangle will be retained. ## ## If @var{range} contains merged cells, only the elements of @var{arr} ## corresponding to the top or left Excel cells of those merged cells @@ -64,18 +67,21 @@ ## the automatic selection by xlswrite of one interface out of the ## supported ones: 'com' (ActiveX/Excel), 'poi' (Java/Apache POI), 'jxl' ## (Java/JExcelAPI), or 'uno' (Java/OpenOffice.org). 'oxs' (Java/OpenXLS) -## is implemented but disabled for writing. For writing to OOXML files -## (.xlsx) a value of 'poi' or 'uno' must be specified for @var{reqintf}. -## The value of @var{reqintf} is case-insensitive. Multiple interfaces -## can be selected if entered as a cell array of strings. +## is implemented but disabled for writing as it is too buggy. For +## writing to OOXML files (.xlsx) a value of 'com', 'poi' or 'uno' must +## be specified for @var{reqintf}. The value of @var{reqintf} is +## case-insensitive. Multiple interfaces can be selected if entered as +## a cell array of strings. ## ## xlswrite is a mere wrapper for various scripts which find out what -## Excel interface to use (COM, Java/POI) plus code to mimic the other +## Excel interface to use (COM, POI, etc) plus code to mimic the other ## brand's syntax. For each call to xlswrite such an interface must be ## started and possibly an Excel file loaded. When writing to multiple ## ranges and/or worksheets in the same Excel file, a speed bonus can be -## obtained by invoking those scripts (xlsopen / octxls / .... / xlsclose) -## directly. +## obtained by invoking those scripts directly with multiple calls to +## oct2xls (one for each sheet or range) surrounded by one call to +## xlsopen and xlsclose: +## (xlsopen / octxls / oct2xls / .... / xlsclose) ## ## Examples: ##