Mercurial > forge
changeset 12437:ff793245b5d2 octave-forge
More texinfo header (help text) updates
author | prnienhuis |
---|---|
date | Tue, 15 Apr 2014 20:26:24 +0000 |
parents | b8b7b9fe9eb2 |
children | 34ebb4f7ba24 |
files | main/io/inst/chk_spreadsheet_support.m main/io/inst/ods2oct.m main/io/inst/odsfinfo.m main/io/inst/odsopen.m main/io/inst/odsread.m main/io/inst/xlsclose.m main/io/inst/xlsfinfo.m main/io/inst/xlsread.m |
diffstat | 8 files changed, 55 insertions(+), 45 deletions(-) [+] |
line wrap: on
line diff
--- a/main/io/inst/chk_spreadsheet_support.m Tue Apr 15 15:42:23 2014 +0000 +++ b/main/io/inst/chk_spreadsheet_support.m Tue Apr 15 20:26:24 2014 +0000 @@ -91,10 +91,10 @@ ## @end table ## ## Output: -## @var{retval} = 0: only spreadsheet read support for OOXML, -## ODS 1.2 and gnumeric present through OCT interface, or +## @var{retval} = 0: only spreadsheet support for OOXML & ODS 1.2 +## and read support for gnumeric present through OCT interface, or ## @var{retval} <> 0: At least one read/write spreadsheet I/O -## interface found. +## interface found based on external software. ## RETVAL will be set to the sum of values for found interfaces: ## @example ## 0 = OCT (Native Octave) @@ -170,6 +170,7 @@ ## 2014-01-17 Tame messages about COM/ActiveX if dbug = 0 ## 2014-04-06 Skip unojarpath search for UNO entries 4 and up; code style fixes ## 2014-04-14 Updated texinfo header & OCT r/w support messages +## 2014-04-15 More updates to texinfo header function [ retval, sinterfaces, loaded_jars ] = chk_spreadsheet_support (path_to_jars, dbug, path_to_ooo)
--- a/main/io/inst/ods2oct.m Tue Apr 15 15:42:23 2014 +0000 +++ b/main/io/inst/ods2oct.m Tue Apr 15 20:26:24 2014 +0000 @@ -46,7 +46,7 @@ ## @item "formulas_as_text" ## If set to TRUE or 1, spreadsheet formulas (if at all present) ## are read as formula strings rather than the evaluated formula -## result values. This only works for the OTK and UNO interfaces. +## result values. This only works for the OTK, UNO and OCT interfaces. ## The default value is 0 (FALSE). ## ## @item 'strip_array' @@ -132,6 +132,7 @@ ## 2013-12-01 Style fixes ## 2013-12-27 More style fixes ## 2014-04-13 Copyright string updated +## 2014-04-15 More updates to texinfo header ## ## Latest subfunc update: 2012-10-12
--- a/main/io/inst/odsfinfo.m Tue Apr 15 15:42:23 2014 +0000 +++ b/main/io/inst/odsfinfo.m Tue Apr 15 20:26:24 2014 +0000 @@ -1,4 +1,4 @@ -## Copyright (C) 2009,2010,2011,2012,2013 Philip Nienhuis +## Copyright (C) 2009,2010,2011,2012,2013,2014 Philip Nienhuis ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software @@ -16,16 +16,16 @@ ## -*- texinfo -*- ## @deftypefn {Function File} [@var{filetype}] = odsfinfo (@var{filename} [, @var{reqintf}]) ## @deftypefnx {Function File} [@var{filetype}, @var{sh_names}] = odsfinfo (@var{filename} [, @var{reqintf}]) -## Query an OpenOffice_org spreadsheet file @var{filename} (with ods -## suffix) for some info about its contents. +## Query an OpenOffice_org or Gnumeric spreadsheet file @var{filename} +## (with ods or gnumeric suffix) for some info about its contents. ## -## If @var{filename} is a recognizable OpenOffice.org spreadsheet file, -## @var{filetype} returns the string "OpenOffice.org Calc spreadsheet", -## or @'' (empty string) otherwise. +## If @var{filename} is a recognizable OpenOffice.org or Gnumeric spreadsheet +## file, @var{filetype} returns the string "OpenOffice.org Calc spreadsheet" +## (or "Gnumeric spreadsheet"), or @'' (empty string) otherwise. ## -## If @var{filename} is a recognizable OpenOffice.org Calc spreadsheet -## file, optional argument @var{sh_names} contains a list (cell array) -## of sheet names contained in @var{filename}, in the order (from left +## If @var{filename} is a recognizable OpenOffice.org Calc or Gnumeric +## spreadsheet file, optional argument @var{sh_names} contains a list (cell +## array) of sheet names contained in @var{filename}, in the order (from left ## to right) in which they occur in the sheet stack. ## ## If you omit return arguments @var{filetype} and @var{sh_names} altogether, @@ -38,7 +38,7 @@ ## used data ranges. ## ## By specifying a value of 'jod', 'otk', 'uno' or 'oct' for @var{reqintf} the -## automatic selection of the java interface is bypassed and the specified +## automatic selection of the Java interface is bypassed and the specified ## interface will be used (if at all present). ## ## Examples:
--- a/main/io/inst/odsopen.m Tue Apr 15 15:42:23 2014 +0000 +++ b/main/io/inst/odsopen.m Tue Apr 15 20:26:24 2014 +0000 @@ -35,25 +35,25 @@ ## The relevant Java class libs for spreadsheet I/O had best be added to the ## javaclasspath by utility function chk_spreadsheet_support(). ## -## @var{filename} must be a valid .ods OpenOffice.org file name including -## .ods suffix. If @var{filename} does not contain any directory path, -## the file is saved in the current directory. -## For UNO bridge, filenames need to be in the form "file:///<path_to_file>/filename"; +## @var{filename} must be a valid .ods OpenOffice.org Calc, or Gnumeric, file +## name including .ods or .gnumeric suffix. If @var{filename} does not contain +## any directory path, the file is saved in the current directory. For UNO +## bridge, filenames need to be in the form "file:///<path_to_file>/filename"; ## a URL will also work. If a plain file name is given (absolute or relative), -## odsopen() will transform it into proper form. +## odsopen() will try to transform it into proper form. ## ## @var{readwrite} must be set to true or numerical 1 if writing to spreadsheet ## is desired immediately after calling odsopen(). It merely serves proper ## handling of file errors (e.g., "file not found" or "new file created"). ## ## Optional input argument @var{reqintf} can be used to override the ODS -## interface automatically selected by odsopen. Currently implemented interfaces -## are 'OTK' (Java/ODF Toolkit), 'JOD' (Java/jOpenDocument), 'UNO' -## (Java/OpenOffice.org UNO bridge), and 'OCT' (native Octave, only reading). -## In most situations this parameter is unneeded as odsopen automatically -## selects the most useful interface present ("default interface"). -## Depending on file type, odsopen.m can invoke other detected interfaces than -## the default one. +## interface automatically selected by odsopen. Currently implemented +## interfaces are 'OTK' (Java/ODF Toolkit), 'JOD' (Java/jOpenDocument), 'UNO' +## (Java/OpenOffice.org UNO bridge), and 'OCT' (native Octave, for Gnumeric +## only reading). In most situations this parameter is unneeded as odsopen +## automatically selects the most useful interface present ("default +## interface"). Depending on file type, odsopen.m can invoke other detected +## interfaces than the default one. ## ## Beware: ## The UNO interface is still experimental. While in itself reliable, it may @@ -137,6 +137,7 @@ ## '' Copyright string update ## 2014-01-23 OCT ods write support for .ods ## 2014-04-14 Update texinfo header +## 2014-04-15 More updates to texinfo header function [ ods ] = odsopen (filename, rw=0, reqinterface=[])
--- a/main/io/inst/odsread.m Tue Apr 15 15:42:23 2014 +0000 +++ b/main/io/inst/odsread.m Tue Apr 15 20:26:24 2014 +0000 @@ -42,8 +42,8 @@ ## the filename extension (.ods). ## ## @var{wsh} is either numerical or text, in the latter case it is -## case-sensitive and it should conform to OpenOffice.org Calc sheet -## name requirements. +## case-sensitive and it should conform to OpenOffice.org Calc or +## Gnumeric sheet name requirements. ## Note that in case of a numerical @var{wsh} this number refers to the ## position in the worksheet stack, counted from the left in a Calc ## window. The default is numerical 1, i.e. the leftmost worksheet @@ -65,9 +65,9 @@ ## 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'), Java/jOpenDocument -## ('JOD'), Java/UNO bridge ('UNO'), or native Octave (OCT; only for -## reading). Octave selects one of these, preferrably in the order -## above, based on presence of support software and the file at hand. +## ('JOD'), Java/UNO bridge ('UNO'), or native Octave (OCT). Octave +## selects one of these, preferrably in the order above, based on +## presence of support software and the file at hand. ## ## 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 @@ -78,7 +78,8 @@ ## .ods format by OpenOffice.org Calc may have different date base ## values. ## As there's no gnumeric formula evaluator and gnumeric doesn't store -## cached formula results, formulas are returned as text strings. +## cached formula results, formulas are returned as text strings when +## reading from Gnumeric files. ## ## @var{numarr} and @var{txtarr} are trimmed from empty outer rows ## and columns, so any returned array may turn out to be smaller than @@ -140,6 +141,7 @@ ## '' Add .sxc to supported file types ## 2013-12-01 Updated texinfo header ## 2014-04-13 Updated copyright strings and texinfo header +## 2014-04-15 More updates to texinfo header function [ numarr, txtarr, rawarr, lim ] = odsread (filename, wsh=1, datrange=[], reqintf=[])
--- a/main/io/inst/xlsclose.m Tue Apr 15 15:42:23 2014 +0000 +++ b/main/io/inst/xlsclose.m Tue Apr 15 20:26:24 2014 +0000 @@ -37,10 +37,10 @@ ## an other file than opened with xlsopen(); unfortunately this doesn't work ## with JXL (JExcelAPI) interface. ## -## You need MS-Excel (95 - 2010), and/or the Java package => 1.2.8 plus Apache -## POI > 3.5 and/or JExcelAPI and/or OpenXLS and/or OpenOffice.org or clones -## installed on your computer + proper javaclasspath set, to make this -## function work at all. +## For other file formats than OOXML and ODS, you need MS-Excel (95 - 2010), +## and/or the Java package => 1.2.8 plus Apache POI > 3.5 and/or JExcelAPI +## and/or OpenXLS and/or OpenOffice.org or clones installed on your computer +## + proper javaclasspath set, to make this function work at all. ## ## @var{xls} must be a valid pointer struct made by xlsopen() in the same ## octave session.
--- a/main/io/inst/xlsfinfo.m Tue Apr 15 15:42:23 2014 +0000 +++ b/main/io/inst/xlsfinfo.m Tue Apr 15 20:26:24 2014 +0000 @@ -1,4 +1,4 @@ -## Copyright (C) 2009,2010,2011,2012,2013 Philip Nienhuis <pr.nienhuis at users.sf.net> +## Copyright (C) 2009,2010,2011,2012,2013,2014 Philip Nienhuis ## ## This program is free software; you can redistribute it and/or modify it under ## the terms of the GNU General Public License as published by the Free Software @@ -48,9 +48,11 @@ ## info and/or different treatment of empty but formatted cells, each ## interfaces may give different results). ## -## For use on OOXML spreadsheets one needs full POI and/or UNO support (see -## xlsopen) and 'poi' or 'uno' needs to be specified for @var{reqintf}. For -## Excel 95 file use 'jxl' or 'uno'. +## For OOXML spreadsheets no external SW is required but full POI and/or +## UNO support (see xlsopen) may work better or faster; to use those specify +## 'poi' or 'uno' for @var{reqintf}. For Excel 95 files use 'com' (windows +## only), 'jxl' or 'uno'. Gnumeric files can be explored with the built-in +## OCT interface (no need to specify @var{reqintf} then). ## ## Examples: ## @@ -69,7 +71,7 @@ ## ## @end deftypefn -## Author: Philip Nienhuis <prnienhuis@users.sourceforge.net> +## Author: Philip Nienhuis <prnienhuis at users.sourceforge.net> ## Created: 2009-10-27 ## Updates: ## 2009-01-01 Echo sheet names to screen, request interface type) @@ -90,7 +92,9 @@ ## 2012-10-24 Style fixes ## 2013-10-01 OCT interface added for gnumeric ## 2013-12-01 Style fixes & support for more file types than just Excel -## 2013-12-29 Style fixes +## 2013-12-29 Style fixes +## 2014-04-15 Updates to texinfo header + function [ filetype, sh_names, fformat ] = xlsfinfo (filename, reqintf=[])
--- a/main/io/inst/xlsread.m Tue Apr 15 15:42:23 2014 +0000 +++ b/main/io/inst/xlsread.m Tue Apr 15 20:26:24 2014 +0000 @@ -70,8 +70,8 @@ ## ones: COM/Excel, Java/Apache POI, Java/JExcelAPI, Java/OpenXLS, ## Java/UNO (OpenOffice.org), or native Octave (in that -built in- ## order of preference). -## For reading from OOXML files a value of 'com', 'poi', 'uno', or 'oct' -## must be specified for @var{reqintf} (see help for xlsopen); for +## For I/O to/from OOXML files a value of 'com', 'poi', 'uno', or 'oct' +## 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 @@ -156,7 +156,8 @@ ## 2013-09-30 Header adapted to native OCT interface f xlsx ## 2013-12-20 Style fixes ## 2013-12-27 In case of .csv fall back to csvread for lazy Matlab users -## 2014-04-13 Updated copyright strings & texinfo header +## 2014-04-13 Updated copyright strings & texinfo header +## 2014-04-15 More updates to texinfo header function [ numarr, txtarr, rawarr, lims ] = xlsread (fn, wsh, datrange, reqintf=[])