Mercurial > forge
changeset 12424:f54a41e480e2 octave-forge
Updated copyright strings and texinfo headers
author | prnienhuis |
---|---|
date | Sun, 13 Apr 2014 17:45:59 +0000 |
parents | 06c3bbaa70b4 |
children | 969438a9c069 |
files | main/io/inst/ods2oct.m main/io/inst/odsclose.m main/io/inst/odsread.m main/io/inst/odswrite.m main/io/inst/xlsclose.m main/io/inst/xlsopen.m main/io/inst/xlsread.m main/io/inst/xlswrite.m |
diffstat | 8 files changed, 80 insertions(+), 65 deletions(-) [+] |
line wrap: on
line diff
--- a/main/io/inst/ods2oct.m Sun Apr 13 10:21:30 2014 +0000 +++ b/main/io/inst/ods2oct.m Sun Apr 13 17:45:59 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 @@ -20,7 +20,8 @@ ## @deftypefnx {Function File} [ @var{rawarr}, @var{ods}, @var{rstatus} ] = ods2oct (@var{ods}, @var{wsh}, @var{range}, @var{options}) ## ## Read data contained within cell range @var{range} from worksheet @var{wsh} -## in an OpenOffice_org Calc spreadsheet file pointed to in struct @var{ods}. +## in an OpenOffice_org Calc or Gnumeric spreadsheet file pointed to +## in struct @var{ods}. ## ## @var{ods} is supposed to have been created earlier by odsopen in the ## same octave session. @@ -30,7 +31,7 @@ ## 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 -## in the ODS file. +## in the ODS or gnumeric file. ## ## @var{range} is expected to be a regular spreadsheet range format, ## or "" (empty string, indicating all data in a worksheet). @@ -74,14 +75,14 @@ ## requested data have been read successfully, 0 otherwise. ## ## Erroneous data and empty cells turn up empty in @var{rawarr}. -## Date/time values in OpenOffice.org are returned as numerical values -## with base 1-1-0000 (same as octave). But beware that Excel spreadsheets -## rewritten by OpenOffice.org into .ods format may have numerical date -## cells with base 01-01-1900 (same as MS-Excel). +## Date/time values in OpenOffice.org or Gnumeric are returned as numerical +## values with base 1-1-0000 (same as octave). But beware that Excel +## spreadsheets rewritten by OpenOffice.org into .ods format may have +## numerical date cells with epoch (base) 01-01-1900 (same as MS-Excel). ## ## When reading from merged cells, all array elements NOT corresponding -## to the leftmost or upper OpenOffice.org cell will be treated as if the -## "corresponding" cells are empty. +## to the leftmost or upper OpenOffice.org Calc or Gnumeric cell will be +## treated as if the "corresponding" cells are empty. ## ## Examples: ## @@ -130,6 +131,7 @@ ## 2013-10-02 Some adaptations for gnumeric ## 2013-12-01 Style fixes ## 2013-12-27 More style fixes +## 2014-04-13 Copyright string updated ## ## Latest subfunc update: 2012-10-12
--- a/main/io/inst/odsclose.m Sun Apr 13 10:21:30 2014 +0000 +++ b/main/io/inst/odsclose.m Sun Apr 13 17:45:59 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 @@ -73,7 +73,8 @@ ## 2013-09-09 Native Octave interface ("OCT") for reading ## '' Warning message for empty file ptr structs ## 2013-10-02 Texinfo header adapted -## 2013-12-01 Style fixes +## 2013-12-01 Style fixes +## 2014-04-13 Updated copyright strings function [ ods ] = odsclose (ods, varargs)
--- a/main/io/inst/odsread.m Sun Apr 13 10:21:30 2014 +0000 +++ b/main/io/inst/odsread.m Sun Apr 13 17:45:59 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 @@ -23,13 +23,14 @@ ## in OpenOffice_org Calc spreadsheet file @var{filename}. Reading ## Gnumeric xml files is also supported. ## -## A native Octave interface (OCT) is available for reading data. -## For ODS the supported Java-based interfaces offer more flexibility -## and better speed, plus write support. For these you need a Java JRE or JDK +## A native Octave interface (OCT) is available, but presently still +## experimental. For ODS only the supported Java-based interfaces offer +## more flexibility and better speed. For those you need a Java JRE or JDK ## and one or both of jopendocument-<version>.jar or preferrably: (odfdom.jar ## (versions 0.7.5 or 0.8.6-0.8.8) & xercesImpl.jar v. 2.9.1) in your ## javaclasspath. There is also experimental support invoking -## OpenOffice.org/LibreOffice or clones through a Java/UNO bridge. +## OpenOffice.org/LibreOffice or clones through a Java/UNO bridge. +## The OCT interface also offers .gnumeric read support. ## ## Return argument @var{numarr} contains the numeric data, optional ## return arguments @var{txtarr} and @var{rawarr} contain text strings @@ -65,8 +66,8 @@ ## 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. +## reading). 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 @@ -137,7 +138,8 @@ ## '' Texinfo header adapted ## 2013-11-04 Better error message about unsupported file types ## '' Add .sxc to supported file types -## 2013-12-01 Updated texinfo header +## 2013-12-01 Updated texinfo header +## 2014-04-13 Updated copyright strings and texinfo header function [ numarr, txtarr, rawarr, lim ] = odsread (filename, wsh=1, datrange=[], reqintf=[])
--- a/main/io/inst/odswrite.m Sun Apr 13 10:21:30 2014 +0000 +++ b/main/io/inst/odswrite.m Sun Apr 13 17:45:59 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 @@ -59,15 +59,16 @@ ## The optional last argument @var{reqintf} can be used to override ## the automatic selection by odswrite of one interface out of the ## supported ones: Java/ODFtooolkit ('OTK'), Java/jOpenDocument ('JOD'), -## or Java/OpenOffice.org ('UNO'). +## Java/OpenOffice.org ('UNO'), or native Octave ('OCT'). ## ## odswrite is a mere wrapper for various scripts which find out what -## ODS interface to use (ODF toolkit or jOpenDocument) plus code to mimic -## the other brand's syntax. For each call to odswrite such an interface -## must be started and possibly an ODS file loaded. When writing to multiple -## ranges and/or worksheets in the same ODS file, a speed bonus can be -## obtained by invoking those scripts (odsopen / octods / .... / odsclose) -## directly. +## ODS interface to use (ODF toolkit, jOpenDocument, Open/LibreOffice or +## native Octave) plus code to mimic the other brand's xlswrite syntax +## (and quirks). +## For each call to odswrite such an interface must be started and +## possibly an ODS file loaded. When writing to multiple ranges and/or +## worksheets in the same ODS file, a speed bonus can be obtained by +## invoking those scripts (odsopen / octods / .... / odsclose) directly. ## ## Example: ## @@ -82,7 +83,7 @@ ## ## @end deftypefn -## Author: Philip Nienhuis +## Author: Philip Nienhuis <pr.nienhuis at users.sf.net> ## Created: 2009-12-14 ## Updates: ## 2010-01-14 Finalized write support tru ODS toolkit @@ -97,7 +98,8 @@ ## 2012-06-08 Tabs replaced by double space ## 2012-10-24 Style fixes ## 2013-12-18 Copyright string updates, style fixes -## 2014-01-01 Drop file extension check +## 2014-01-01 Drop file extension check +## 2014-04-13 Updated copyright strings & texinfo header function [ rstatus ] = odswrite (filename, data, wsh=1, crange="", reqintf=[])
--- a/main/io/inst/xlsclose.m Sun Apr 13 10:21:30 2014 +0000 +++ b/main/io/inst/xlsclose.m Sun Apr 13 17:45:59 2014 +0000 @@ -1,4 +1,4 @@ -## Copyright (C) 2009,2010,2011,2012,2013 Philip Nienhuis <prnienhuis 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 @@ -56,7 +56,7 @@ ## ## @end deftypefn -## Author: Philip Nienhuis +## Author: Philip Nienhuis <prnienhuis at users.sf.net> ## Created: 2009-11-29 ## Updates: ## 2010-01-03 (checked OOXML support) @@ -81,7 +81,8 @@ ## 2013-09-30 OCT interface added ## 2013-10-01 Warn for empty struct input ## 2013-12-29 Style fixes -## 2014-01-01 Style fixes +## 2014-01-01 Style fixes +## 2014-04-13 Updated copyright strings function [ xls ] = xlsclose (xls, varargs)
--- a/main/io/inst/xlsopen.m Sun Apr 13 10:21:30 2014 +0000 +++ b/main/io/inst/xlsopen.m Sun Apr 13 17:45:59 2014 +0000 @@ -25,22 +25,20 @@ ## Calling xlsopen without specifying a return argument is fairly useless! ## ## xlsopen works with interfaces, which are links to external software. -## For reading from OOXML (Excel 2007 and up), ODS 1.2 and Gnumeric no -## additional software is required when the OCT interface is used. For all -## other spreadsheet formats and for writing to spreadsheet files, you need -## MS-Excel (95 - 2013), or a Java JRE plus Apache POI >= 3.5 and/or JExcelAPI +## For I/O from OOXML (Excel 2007 and up), ODS 1.2 and Gnumeric, no +## additional software is required when the OCT interface is used (see below). +## For all other spreadsheet formats, you need one or more of MS-Excel +## (95 - 2013), or a Java JRE plus Apache POI >= 3.5 and/or JExcelAPI ## and/or OpenXLS and/or OpenOffice.org (or clones) installed on your computer ## + proper javaclasspath set. These interfaces are referred to as COM, POI, ## JXL, OXS, and UNO, resp., and are preferred in that order by default -## (depending on their presence). The OCT interface has the lowest priority. -## For OOXML read/write support, in addition to Apache POI support you also -## need the following jars in your javaclasspath: poi-ooxml-schemas-3.5.jar, -## xbean.jar and dom4j-1.6.1.jar (or later versions). Later OpenOffice.org -## versions (UNO interface) have support for OOXML as well. -## Excel'95 spreadsheets can only be read by JExcelAPI and OpenOffice.org. -## For just reading OOXML (.xlsx or .xlsm), no Java or add-on packages are -## required; but currently you loose a bit of the flexibility of the other -## interfaces. +## (depending on their presence). Currently the OCT interface has the lowest +## priority as it is still experimental. +## For OOXML read/write support in principle no additional SW is needed. +## However, the COM, POI and UNO interfaces may provide better OOXML write +## performance and/or more flexibility. +## Excel'95 spreadsheets (BIFF5) can only be read using the COM (Excel-ActiveX), +## JXL (JExcelAPI), and UNO (Open-/LibreOffice) interfaces. ## ## @var{filename} should be a valid .xls or xlsx Excel file name (including ## extension). But if you use the COM interface you can specify any extension @@ -49,9 +47,9 @@ ## allowed. If @var{filename} does not contain any directory path, the file ## is saved in the current directory. ## -## If @var{readwrite} is set to 0 (default value) or omitted, the Excel file -## is opened for reading. If @var{readwrite} is set to True or 1, an Excel -## file is opened (or created) for reading & writing. +## If @var{readwrite} is set to 0 (default value) or omitted, the spreadsheet +## file is opened for reading. If @var{readwrite} is set to true or 1, a +## spreadsheet file is opened (or created) for reading & writing. ## ## Optional input argument @var{reqintf} can be used to override the Excel ## interface that otherwise is automatically selected by xlsopen. Currently @@ -140,7 +138,8 @@ ## 2014-01-01 Add .csv to supported file extensions ## '' Add warning that UNO will write ODS f. unsupported file extensions ## '' Copyright string update -## 2014-02-02 Allow write support for OCT interface +## 2014-02-02 Allow write support for OCT interface +## 2014-04-13 Updated texinfo header function [ xls ] = xlsopen (filename, xwrite=0, reqinterface=[])
--- a/main/io/inst/xlsread.m Sun Apr 13 10:21:30 2014 +0000 +++ b/main/io/inst/xlsread.m Sun Apr 13 17:45:59 2014 +0000 @@ -1,4 +1,4 @@ -## Copyright (C) 2009,2010,2011,2012,2013 by Philip Nienhuis <prnienhuis at users.sf.net> +## Copyright (C) 2009,2010,2011,2012,2013,2014 by 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 @@ -33,7 +33,8 @@ ## 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 all file formats can be read that are supported by the -## locally installed MS-Excel version (e.g., wk1, csv, dbf, etc.). +## locally installed MS-Excel version (e.g., wk1, csv, dbf, etc.). +## The same holds for UNO (OpenOffice.orgor LibreOffice). ## ## @var{range} is expected to be a regular spreadsheet range format, ## or "" (empty string, indicating all data in a worksheet). @@ -72,20 +73,23 @@ ## For reading 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 -## can select or exclude one or more interfaces. +## '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. +## In addition the OCT interface offers .gnumeric read support. ## ## 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 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.). Spreadsheet date values lying before 1/1/1900 are -## returned as strings, formatted as they appear in the spreadsheet. +## 1/1/0000, resp.). When using the COM interface, 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 -## @var{range}. +## @var{range}. Use the fourth return argument @var{LIMS} for info on the +## cell ranges your date came from. ## ## When reading from merged cells, all array elements NOT corresponding ## to the leftmost or upper Excel cell will be treated as if the @@ -127,7 +131,7 @@ ## ## @end deftypefn -## Author: Philip Nienhuis +## Author: Philip Nienhuis <prnienhuis at users.sf.net> ## Created: 2009-10-16 ## Updates: ## 2009-12-29 bug fixes @@ -151,7 +155,8 @@ ## 2013-09-27 Proper spelling of input arg ## 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 +## 2013-12-27 In case of .csv fall back to csvread for lazy Matlab users +## 2014-04-13 Updated copyright strings & texinfo header function [ numarr, txtarr, rawarr, lims ] = xlsread (fn, wsh, datrange, reqintf=[])
--- a/main/io/inst/xlswrite.m Sun Apr 13 10:21:30 2014 +0000 +++ b/main/io/inst/xlswrite.m Sun Apr 13 17:45:59 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 @@ -40,7 +40,7 @@ ## @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 -## normally creates by default are deleted. +## usually creates by default are deleted (COM) or simply not created. ## 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). @@ -65,9 +65,11 @@ ## The optional last argument @var{reqintf} can be used to override ## 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 as it is too buggy. For -## writing to OOXML files (.xlsx) a value of 'com', 'poi' or 'uno' must +## (Java/JExcelAPI), 'uno' (Java/OpenOffice.org), or 'OCT' (native Octave +## w/o any external support software). 'oxs' (Java/OpenXLS) has been +## implemented but disabled for writing OOXML as it is too buggy; for +## BIFF8 (Excel '97 .xls) it works reliably. For writing to OOXML files +## (.xlsx) a value of 'com', 'poi', 'uno', or 'oct' 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. @@ -113,7 +115,8 @@ ## 2012-04-21 Improve xls/xlsx suffix check ## 2013-12-07 Updated copyright string ## '' Check on empty file ptr struct after calling xlsopen -## 2014-03-18 Convey full crange to oct2xls, not just topleft +## 2014-03-18 Convey full crange to oct2xls, not just topleft +## 2014-04-13 Update texinfo header function [ rstatus ] = xlswrite (filename, arr, arg3, arg4, arg5)