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: Sun, 20 Sep 2015 20:38:37 +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):

                  Status:               Postponed => In Progress            

    _______________________________________________________

Follow-up Comment #2:

It took remarkably little time to implement this, it already works for OCT
(.xlsx, .ods, .gnumeric), POI (.xlsx/.xls) & OXS.  I took the liberty to amend
your getDefinedNames function a little and morph it into
__OCT_xlsx_getnmranges__.m.

Figuring out COM, JXL and UNO seems a bit harder, haven't looked at OTK an JOD
interfaces yet.
What I wrote below about error checking in xls2oct etc is already largely
covered by try-catches in xlsread etc.

xlsfinfo now returns named ranges when echoed to screen as I suggested in
comment #1.

There are a few things to figure out:

A first little issue to tackle is the scope of named ranges. That seems to
depend on the file type.
Some file types have ranges referring to either just one sheet (easy) or the
entire workbook w/o any sheet reference (e.g., gnumeric).  Elsewhere (e.g.,
OOXML) workbook scope cannot be figured out from the info I have. ODS has
3D-ranges covering multiple sheets; I saw that also mentioned in the OXS
(OpenXLS) javadocs.
I have never used named ranges so some experimenting is needed here. 
@Andy: would you have some advice?

A second issue is ambiguity when xlsread has to distinguish between a sheet
name and a named range; either one can be 2nd input arg.  It may be that this
part must be done only after the named ranges are known, but currently xlsread
isn't the place to figure that out - it's done in xls2oct/oct2xls and only IF
a named range seems to have been specified (to avoid unneeded lookups). 
Likewise for xlswrite.
AFAIK Matlab's xlsread/xlswrite don't support named ranges at all, so we have
to find a convenient yet robust and hopefully monkey-proof way to implement
this in io-2.2.10+

Attached is a first batch of files to replace a few functions in an installed
io package: xlsfinfo.m + several files that go into private/   (xlsread/-write
are yet untouched, they just work with range names as well now).
Untar over your current io package and try it out. And please let me know what
you think of it!


(file #34940)
    _______________________________________________________

Additional Item Attachment:

File name: io_namedrange_try1.tar.gz      Size:5 KB


    _______________________________________________________

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]