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 788801 - [ODF] import of Excel generated contour chart
[ODF] import of Excel generated contour chart
Status: RESOLVED OBSOLETE
Product: Gnumeric
Classification: Applications
Component: import/export OOo / OASIS
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Andreas J. Guelzow
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2017-10-10 22:22 UTC by Andreas J. Guelzow
Modified: 2018-05-22 14:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample Excel generated ODF file containing a contour chart. (6.91 KB, application/vnd.oasis.opendocument.spreadsheet)
2017-10-10 22:22 UTC, Andreas J. Guelzow
Details
xlsx file with surface plot (13.30 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2017-10-11 15:23 UTC, Andreas J. Guelzow
Details
xlsx fiel with contour plot (13.40 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2017-10-11 15:41 UTC, Andreas J. Guelzow
Details

Description Andreas J. Guelzow 2017-10-10 22:22:16 UTC
Created attachment 361294 [details]
Sample Excel generated ODF file containing a contour chart.

The attached file is generated by Excel 2016 and contains a contour chart. Gnumeric miserably fails in importing that chart, providing a few error messages:

heet1!E15
Duplicate default chart/graphics style encountered.
Sheet1!XFE1048577
Unable to parse '[.#REF!]' ('Invalid expression')
Sheet2!XFE1048577
Unable to parse '[.#REF!]' ('Invalid expression')
Sheet3!XFE1048577
Unable to parse '[.#REF!]' ('Invalid expression')
Comment 1 Andreas J. Guelzow 2017-10-11 00:16:34 UTC
For the chart:surface class of chart ODF 1.2 specifies:

Depending on the size of the range specified by chart:values-cell-
range-address attribute of the first <chart:series> element one of two types of
surfaces is rendered.

If the chart:values-cell-range-address attribute of the first <chart:series> element specifies a range with more than one row and more than one column, the first version of a surface chart is rendered. (This is what Gnumeric currently does and expects.) 

If the chart:values-cell-range-address attribute of the first <chart:series>
element specifies a range with a single row or with a single column the second version of a surface chart is rendered. (This is what Excel 2016 produces and likely expects.)

We should at least correctly import the second version.
Comment 2 Andreas J. Guelzow 2017-10-11 04:39:24 UTC
We are now gluing the value ranges together.

Since the Excel ODF file clearly indicates chart:three-dimensional="true" we are rendering it as a surface plot rather than a contour plot. This seems to be an Excel problem.

We still need to handle the series names correctly by gluing them into the appropriate values.
Comment 3 Morten Welinder 2017-10-11 15:14:31 UTC
Can you make an XL2016 generated xlsx out of that file, please?
Comment 4 Andreas J. Guelzow 2017-10-11 15:23:06 UTC
Created attachment 361333 [details]
xlsx file with surface plot
Comment 5 Andreas J. Guelzow 2017-10-11 15:41:41 UTC
Created attachment 361335 [details]
xlsx fiel with contour plot

The previously uploaded xlsx file contained a surface plot. (Excel does not round trip contour plots through it own ODF files, contour plots become surface plots in that round trip.)
Comment 6 Morten Welinder 2017-10-11 16:37:00 UTC
Thanks.  I fixed the !#REF! complaints on load.  They were not graph related.
Comment 7 Morten Welinder 2017-10-11 16:39:18 UTC
Comment on attachment 361333 [details]
xlsx file with surface plot

(Renaming to reflect that it contains a surface chart; still useful)
Comment 8 Morten Welinder 2017-10-11 23:08:56 UTC
I would take a guess that the parse errors 

    Unable to parse '[.#REF!]' ('Invalid expression')

for ods-load are related to Print_Area and should simply be ignored.
Comment 9 Andreas J. Guelzow 2017-10-12 05:34:27 UTC
I have changed the code for the import of the surface and contour plots from Excel's ODF to use the special XLSurface and XLContour types of plots.

We now have a whole bunch of warnings:
 WARNING **: Series with no valid style in legend? Please file a bug report.

I will look at this next.
Comment 10 Jean Bréfort 2017-10-12 06:39:16 UTC
Might be that I never used an XL* plot type with a legend. Please file a new bug report. This is graph related, not import.
Comment 11 Morten Welinder 2017-10-12 15:54:52 UTC
I dealt with [.#REF!] from XL generated ods files.
Comment 12 Andreas J. Guelzow 2017-10-14 06:23:40 UTC
There are some items still missing, such as the view location. Excel does not export true contour charts to ODF. It only exports them as surface charts with an overhead view.
Comment 13 GNOME Infrastructure Team 2018-05-22 14:30:19 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnumeric/issues/323.