After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 166611 - Names defined with another name do not load correctly from an Excel file
Names defined with another name do not load correctly from an Excel file
Product: Gnumeric
Classification: Applications
Component: import/export MS Excel (tm)
git master
Other All
: Immediate major
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Reported: 2005-02-07 23:12 UTC by AlV
Modified: 2005-05-25 15:18 UTC
See Also:
GNOME target: ---
GNOME version: ---

Description AlV 2005-02-07 23:12:58 UTC
Version details: 1.4.2 RC1


I tried to import an Excel 2000 file (that actually works fine in Excel, of
course ;o) into Gnumeric, and it almost succeeded.

Yes, only almost :o7

This Excel file loads but the name assigned to ranges that are defined
according to another name are not properly "understood" and instead there is a
reference error ("#REF!").

Here are the correct names in the Excel sheet:

data		offset(Feuil1!$B$3;0;1;1;min(fen_graph;counta(Feuil1!$3:$3)-2))
fen_graph	Feuil1!$A$25
de_0_à_4	offset(Feuil1!$B$4;0;1;1;min(fen_graph;counta(Feuil1!$4:$4)-1))
de_5_à_9	offset(Feuil1!$B$5;0;1;1;min(fen_graph;counta(Feuil1!$5:$5)-1))
de_10_à_14	offset(Feuil1!$B$6;0;1;1;min(fen_graph;counta(Feuil1!$6:$6)-1))
de_15_à_19	offset(Feuil1!$B$7;0;1;1;min(fen_graph;counta(Feuil1!$7:$7)-1))
de_20_à_24	offset(Feuil1!$B$8;0;1;1;min(fen_graph;counta(Feuil1!$8:$8)-1))
Min1		Feuil1!$A$17
Min2		Feuil1!$A$18
Min3		Feuil1!$A$19
Min4		Feuil1!$A$20
Min5		Feuil1!$A$21
Min6		Feuil1!$A$22

When the Excel file is loaded into Gnumeric, in every name that uses the name
"fen_graph", this name is replaced by an error on the reference "#REF!".

When I manually replace those "#REF!" by the proper name (that's "fen_graph", of
course), Gnumeric properly displays the graph that is built using those names!
(which means that Gnumeric is indeed very compatible with Excel: great job!)

But, this correct content cannot be saved in either Gnumeric or Excel format
or at least when loading the resulting file(s) the result is still incorrect

For example, when loading the gnumeric format file, none of the names that use
the "fen_graph" name inside its definition is present: only "fen_graph",
"Min1" to "Min6" are defined...

As this problem is fairly complicated (and very graphic) to describe, I set up
a web page (with a ton of gorgeous graphics and an Excel file) just for ya :o)

Here it is:

Have a nice day.
Comment 1 Jody Goldberg 2005-02-10 06:22:10 UTC
When I wrote the code I was afraid of this situation but could not create a
workbook that triggered this.  I'll have a look. 
Comment 2 Morten Welinder 2005-02-11 21:06:04 UTC
I imagine we need a two-pass algorithm: first pass just defines the name with
a dummy value, seconds pass changes to the proper value.

That should make sure all needed names are defined before they are used.
Even if someone manages to have circular definitions.
Comment 3 Jody Goldberg 2005-05-14 22:09:16 UTC
I'll take a crack at this now.
Comment 4 Morten Welinder 2005-05-25 15:18:51 UTC
Seems fixed in cvs.