[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #58942] [octave forge] (io) version 2.6.1 read
From: |
Kai Torben Ohlhus |
Subject: |
[Octave-bug-tracker] [bug #58942] [octave forge] (io) version 2.6.1 read cell range data from worksheet |
Date: |
Wed, 12 Aug 2020 21:50:27 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36 |
Update of bug #58942 (project octave):
Status: None => Patch Submitted
Summary: Package I0-2.6.1 Input/Output => [octave forge]
(io) version 2.6.1 read cell range data from worksheet
_______________________________________________________
Follow-up Comment #1:
Thank you very much for your contribution Carlos Obiglio đŸ™‚ I updated the
title and polished the changes of your file to a proper patch and it looks
useful. Maybe Philip considers your changes soon, he is the expert.
--- io-2.6.1/xls2oct.m 2020-07-14 13:10:28.635507529 +0900
+++ xls2oct.m 2020-08-13 10:43:34.960845328 +0900
@@ -121,8 +121,16 @@
## Author: Philip Nienhuis <prnienhuis at users.sf.net>
## Created: 2010-10-16
-function [ rawarr, xls, rstatus ] = xls2oct (xls, wsh=1, datrange="",
spsh_opts=[])
+function [ rawarr, xls, rstatus ] = xls2oct (xls, wsh, datrange="",
spsh_opts=[])
+ if (nargin == 1)
+ wsh = 1;
+ wwsh = 1;
+ endif
+ if (nargin > 1 && ~isempty (wsh))
+ wwsh = wsh;
+ else
+ wwsh = 0;
+ endif
## Check if xls struct pointer seems valid
if (! isstruct (xls))
@@ -150,7 +158,11 @@
elseif (! isempty (datrange))
## Check for range name and convert it to range & optionally sheet 1.
## Check if it matches a range
- [datrange, wsh, xls] = chknmrange (xls, datrange, wsh);
+ if (ischar (wwsh) || wwsh > 0)
+ [datrange, wsh, xls] = chknmrange (xls, datrange, wwsh);
+ else
+ [datrange, wsh, xls] = chknmrange (xls, datrange, wsh);
+ endif
endif
## Check & setup options struct
@@ -216,6 +228,7 @@
case "OCT"
## Read xls file thru native Octave
if (strcmpi (xls.app, "xlsx"))
+ xls.sheets.sh_names = wsh;
[rawarr, xls, rstatus] = __OCT_xlsx2oct__ (xls, wsh, datrange,
spsh_opts);
elseif (strcmpi (xls.app, "gnumeric"))
[rawarr, xls, rstatus] = __OCT_gnm2oct__ (xls, wsh, datrange);
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?58942>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/