Bug 112250 - empty values in y-axis of empty chart
Summary: empty values in y-axis of empty chart
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.4.1.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xlsx
Depends on:
Blocks: OOXML-Chart XLSX-External-Generators
  Show dependency treegraph
 
Reported: 2017-09-05 22:18 UTC by Marc Oggier
Modified: 2023-01-09 03:21 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Exemples preadsheet with bugged chart (19.51 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2017-09-05 23:02 UTC, Marc Oggier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Oggier 2017-09-05 22:18:11 UTC
Description:
When importing a xlsx spreadsheet, containing a chart, modified with openoffice with python using openpyxl modulel, it raised an error. After digging into it with the openpyxl developper, we find out the issue was related to handling empty values in y-axis of the chart. The specification says that [NumVal] elements must have a [v] child which must contain a string.

In my document I have an empty/None value
        <c:pt idx="1">
         <c:v>

         </c:v>

When it should be float or a string like
        <c:pt idx="1">
         <c:v>
          0.0
         </c:v>



Steps to Reproduce:
1. Saving files with an empty chart

Actual Results:  
The [NumVal] elements have a [v] child which is empty/None:

        <c:pt idx="1">
         <c:v>

         </c:v>

Expected Results:
The [NumVal] elements have a [v] child which is a string, according to the specifications

        <c:pt idx="1">
         <c:v>
             0.0
         </c:v>


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
Comment 1 Xisco Faulí 2017-09-05 22:37:11 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)

BTW, this is the LibreOffice's bugzilla, not the OpenOffice's one...
Comment 2 Marc Oggier 2017-09-05 23:02:44 UTC
Created attachment 136054 [details]
Exemples preadsheet with bugged chart
Comment 3 Marc Oggier 2017-09-05 23:05:32 UTC
As requested I attached a spreadsheet exemple.

Sorry to have confused you with OO. You are way better.
Comment 4 raal 2017-09-06 15:28:53 UTC
When I open your file with excel 2010, I get error message. The file doesn't seem to be valid.

Please provide clear steps how to reproduce the bug. Thank you
Comment 5 Marc Oggier 2017-09-06 17:48:52 UTC
I had no problem to open the file either with LibreOffice or Excel 2013+. Could you try again.

The bug happens when loading a .xlsx spreadsheet modified in LibreOffice with the openpyxl module in python. 

1. Creating a chart in a sperate tab
2. Deleting the chart
3. Saving the file
4. Importing with openpyxl in python
Comment 6 Xisco Faulí 2017-09-06 21:38:09 UTC
(In reply to raal from comment #4)
> When I open your file with excel 2010, I get error message. The file doesn't
> seem to be valid.

Same behaviour here... Probably one of those files which are incompatible among different versions of MSO ?
Comment 7 Buovjaga 2017-10-28 14:26:14 UTC
(In reply to Marc Oggier from comment #2)
> Created attachment 136054 [details]
> Exemples preadsheet with bugged chart

So this file was originally created in what program?
Then the error you talk about is raised by openpyxl, right?
Comment 8 Marc Oggier 2017-10-28 19:18:04 UTC
1.a The original file was created with Excel, reopen with LibreOffice, save via OpenOffice and then imported with openpyxl. The error happened.
1.b I created a file with LibreOffice with the same template. The error happened again.

2.a Yes the error raised when opening the file with openpyxl.
2.b I filed a bug report at openpyxl, which added a temporary fix to it. You can find they answer via the following line. (https://bitbucket.org/openpyxl/openpyxl/issues/885/loading-workbook-error-float-argument-must)
Comment 9 Buovjaga 2017-10-31 19:16:26 UTC
Hmm, yeah, I think we can count the analysis of openpyxl dev as confirmation, so setting to NEW.
Comment 10 QA Administrators 2018-11-01 03:51:54 UTC Comment hidden (obsolete)
Comment 11 Mike Kaganski 2018-11-01 11:12:42 UTC
(In reply to Buovjaga from comment #9)
> Hmm, yeah, I think we can count the analysis of openpyxl dev as
> confirmation, so setting to NEW.

Well - I don't think we can count that analysis as a confirmation, until we have a proper report with steps to reproduce.

The bug title is "empty values in y-axis of empty chart".
The comment 0 starts with a sentence mentioning "a xlsx spreadsheet, containing a chart", but no normal steps.
The comment 5 has this:

> 1. Creating a chart in a sperate tab
> 2. Deleting the chart
... which gives us a spreadsheet *without* a chart.

Trying to recreate something out of this gives me nothing. My attempts included:
1. Opening initial file to check if it contained some charts (no);
2. Saving the original file in LO to find if LO writes something like  comment 0 in this case (no; by the way, the saved file doesn't produce errors in Excel 2016, unlike the original);
3. Creating a chart on a separate sheet, with nothing selected (produces an empty chart), and deleting it (literally following comment 5), then saving and looking if it has a chart XML (no);
4. The same as in 3, but without deletion of the chart; the result does contain a chart XML, but no <c:v>s at all;
5. As in 4, but select some range (like A1:B2) on the empty sheet prior to chart creation, and then deleting the single series in the chart (the result is the same as in 4).
Comment 12 Mike Kaganski 2018-11-01 11:28:16 UTC
Further, ECMA-376-1:2016 [1] only mentions "NumVal" as "CT_NumVal" for 21.2.2.150 pt (Numeric Point); but the standard puts just one single requirement to the included c:v element, which is

> <xsd:simpleType name="ST_Xstring">
> <xsd:restriction base="xsd:string"/>
> </xsd:simpleType>

... so no requirement to put some numeric value there.
This makes me wonder if an "analisys" that mentions such requirements in the standard, and then stating things like "but really seems to be a wart in LibreOffice", is something capable to confirm this report.

[1] https://www.ecma-international.org/publications/standards/Ecma-376.htm
Comment 13 Buovjaga 2018-11-01 14:23:01 UTC
Fair enough.
Marc: can you involve the openpyxl dev in this conversation again? Thanks.
Comment 14 Xisco Faulí 2018-11-05 12:53:38 UTC
(In reply to Buovjaga from comment #13)
> Fair enough.
> Marc: can you involve the openpyxl dev in this conversation again? Thanks.

No need to put it in NEEDINFO...
Comment 15 Marc Oggier 2018-11-05 17:29:21 UTC
I will have a look if the bug is still present and involve openpyxl dev if it is.

(In reply to Xisco Faulí from comment #14)
> (In reply to Buovjaga from comment #13)
> > Fair enough.
> > Marc: can you involve the openpyxl dev in this conversation again? Thanks.
> 
> No need to put it in NEEDINFO...

As
Comment 16 QA Administrators 2021-02-26 04:11:04 UTC Comment hidden (obsolete, spam)
Comment 17 Timur 2022-06-11 08:08:54 UTC
This bug needs clear steps responding to Comment 11 and 12.
Comment 18 QA Administrators 2022-12-09 03:24:03 UTC Comment hidden (obsolete)
Comment 19 QA Administrators 2023-01-09 03:21:04 UTC
Dear Marc Oggier,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-FollowUp