GNOME Bugzilla – Bug 788801
[ODF] import of Excel generated contour chart
Last modified: 2018-05-22 14:30:19 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')
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.
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.
Can you make an XL2016 generated xlsx out of that file, please?
Created attachment 361333 [details] xlsx file with surface plot
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.)
Thanks. I fixed the !#REF! complaints on load. They were not graph related.
Comment on attachment 361333 [details] xlsx file with surface plot (Renaming to reflect that it contains a surface chart; still useful)
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.
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.
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.
I dealt with [.#REF!] from XL generated ods files.
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.
-- 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.