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: Andreas Weber
Subject: [Octave-bug-tracker] [bug #45996] io package: add named ranges/definedNames
Date: Mon, 28 Sep 2015 08:05:12 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.3.0

Follow-up Comment #5, bug #45996 (project octave):

The check if it's a "normal" range or a named range currently is (for example
in xl22oct.m line 151)


    mtch = cell2mat (regexp (datrange, ...
                     '(^[A-Za-z]+[0-9]+){1}(:[A-Za-z]+[0-9]+$)?', "tokens"));
    if (! isempty (mtch) && ! strcmp ([mtch{:}], datrange))


This doesn't work if the named range is "foo" for example.

Shouldn't be this

if (isempty (mtch) || ! strcmp ([mtch{:}], datrange))


I tried to find the rules for named ranges but apparently there is no clear
one which is implemented by gnumeric, libreoffice and excel.

What looks common between these 3 is:
Named ranges must start with a letter or an underline. Some allows period or
blanks in their name but I wouldn't count on that.

Some testcases for me:

foo - named range
a1  - classic range
_a1 - named range
aB12 - classic range
aB_12 - named range
XFD123 - classic range
XFE123 - named range (num columns > max)
A1048576 - classic range
A1048577 - named range (num rows > max)
foo1bar - named range
a10:b20 - classic range


I'll create a patch as soon as I find some time...

    _______________________________________________________

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]