octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45996] io package: add named ranges/definedNa


From: Philip Nienhuis
Subject: [Octave-bug-tracker] [bug #45996] io package: add named ranges/definedNames
Date: Fri, 18 Sep 2015 20:22:18 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Firefox/38.0 SeaMonkey/2.35

Update of bug #45996 (project octave):

                Priority:              5 - Normal => 3 - Low                
                  Status:                    None => Postponed              
             Assigned to:                    None => philipnienhuis         
        Operating System:               GNU/Linux => Any                    

    _______________________________________________________

Follow-up Comment #1:

(Maybe this rather belongs on the patch tracker.)

I have been thinking about his from the time of the very first spreadsheet
interface (COM) I made for the io package.

It would be very nice to have, but then I'd like to have it work for all
interfaces and file formats that support named ranges. I'm afraid that's
almost all interfaces and formats, then; not only .xlsx.
IOW, this is a substantial bit of work.

In addition some rigid error checking needs to be in place. Nonexistent ranges
should be catched and treated in an intelligent way. E.g., xls2oct shouldn't
just error out because when it was called from xlsread, the file pointer would
vanish from scope but the operating system and/or JVM could still have zombies
with spreadsheet data becoming inaccessible until the next reboot. Instead
xls2oct should rather return with an empty data array but emit some warning.
Where I write xls2oct I also mean the related interface-specific private
functions.
And so forth. Some more thinking is required before this can be implemented.
Another issue is scope: some names only pertain to individual sheets, others
to the entire workbook. That has to be tackled as well.

I think get_definedNames had better be called something like "getNamedRanges"
or so and should be a private func, to be called by the spreadsheet routines
when some data range is specified by the user and allowing validation. It
should branch to respective spreadsheet interface-specific subfunctions in
private/ named like "__OCT_xlsx_nmranges__.m", "__JOD_ods_nmranges__.m", etc.

As to user exposure, I think returning info on named ranges would be a nice
and well-fitting extension for xlsfinfo.m (and odsfinfo.m).
xlsfinfo.m already does more than its Matlab sibling (ie., it returns occupied
data ranges) so even more useful info wouldn't hurt :-)  it could return a 4th
output arg with the named ranges.

All in all I consider this to be welcome support for an old plan :-)
Thanks!

I'll set status to "postponed", but I'll start working on it - yet at slow
pace. If you want to cooperate, email me privately.

(and some nitty-gritty:
- when just reading, call xlsopen with 0 for 2nd arg, just to be safe
- personally I would replace the while loop by a regexp.
For the rest I think you've clearly catched the spirit of the io package
programming style ;-) )

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45996>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]