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 625332 - ODS import of named expressions
ODS import of named expressions
Status: RESOLVED NOTGNOME
Product: Gnumeric
Classification: Applications
Component: import/export OOo / OASIS
unspecified
Other All
: Normal normal
: ---
Assigned To: Andreas J. Guelzow
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2010-07-26 16:04 UTC by inmusx
Modified: 2010-07-27 20:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
O-O spreadsh. failed to import to Gnumeric correctly (275.43 KB, application/vnd.oasis.opendocument.spreadsheet)
2010-07-26 16:04 UTC, inmusx
Details

Description inmusx 2010-07-26 16:04:08 UTC
Created attachment 166595 [details]
O-O spreadsh. failed to import to Gnumeric correctly

Use of "NAME" to identify database range (e.g. b3:q2003) does not convert from ods file.  Editing (by search and replace) to re-name database "NAME" to range in gnumeric (e.g. as b3:q2003) is only partially effective and results in many errors e.g. whilst dsum() and other functions work in gnumeric after above editing, dmax() produces errors.

I am disappointed that Gnumeric falls far below claims of compatibility.
I have found  Gnumeric only adequate for very basic spreadsheet designs, and needs major editing of more powerful existing spreadsheets generated by other software.

Conversion MS - O_O - MS file (seems to work perfectly.

When Gnumeric approaches the very polished performance of Open_Office, I will reconsider.  It would be very useful to have a fully working spreadsheet which can stand alone (unlike Open_Office)

Inmusx

(Graph on first sheet also failed to import)
Comment 1 Morten Welinder 2010-07-26 16:52:18 UTC
The DATA name doesn't seem to get imported.  ("<table:database-ranges>" in
the file.  We parse it, but do not act on it.)

ODS is not a high priority for us since it still -- after years and years --
is incompletely defined for spreadsheets.  To transfer that file to
Gnumeric, it would make more sense to go via .xls which is a crummy,
but well understood, format.

Note, that the file is not a valid ODS file.  It contains junk like
"#ref!.[.$C$2]:#ref!.[.$Q$999]"
Comment 2 Andreas J. Guelzow 2010-07-26 22:39:12 UTC
First of all some general comments:

There is no ODF standard that describes the behaviour of any functions such as dsum, dmax etc. (There is a committee draft ODF 1.2 that would recommend certain functions but that draft is currently in public review and as a result of that review is surely going to change.)

Your attached file claims to be ODF 1.2 (office:version="1.2"). That ODF version does not exist yet and really nobody can forecast the details of the specifications.

Looking at ODF 1.2 Committee Draft 5 (the most recent version), the first argument in DSUM, DMAX, etc is a database which is either a "range" of a "named range" (part 2 4.11.8). Named ranges are defined by  (part 1 19.595.7)<table:named-range>. Specifications by <table:database-ranges> have no bearing on the evaluation of OpenFormula formulas.

[Note that you can have a name that is used for a database, and a named range, and also for others things, eg. the name of a table, so it is important to consider which type of object can be referred too.]

The file in question does not contain any table:named-ranges elements so there is no way for Gnumeric to interpret what DATA is supposed to mean.

Note that we do import <table:named-range> correctly. 

What you are looking at is an OpenOffice bug, They are apparently not saving the file correctly, at least not according to any current ODF version or draft.
Comment 3 Morten Welinder 2010-07-27 19:15:24 UTC
Andreas: should we do something about these warnings?

WARNING **: Unknown namespace uri = 'http://www.w3.org/2003/g/data-view#'
WARNING **: Unknown namespace uri = 'http://www.w3.org/1999/xhtml'
Comment 4 Andreas J. Guelzow 2010-07-27 20:05:19 UTC
Morten: If we could tell libgsf (or whoever creates them) by default not to print such warning (ie. to print them only if some environment variable is set), that would be great. In every point release OOo adds or changes some namespace uri's. So we basically always get warnings....
Comment 5 Andreas J. Guelzow 2010-07-27 20:07:16 UTC
I have committed a change that (contrary to the ODF standard) defines a range to match any named filter given in the file. Most users are likely to blame us for not correctly opening an ods file created by OOo rather than OOo for creating invalid files.