Bug 123834

Summary: FILEOPEN XLSX Line chart has gaps instead of 0.0 values if the cell content is a string
Product: LibreOffice Reporter: NISZ LibreOffice Team <libreoffice>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: kelemeng, nemeth
Priority: medium Keywords: filter:xlsx
Version: 6.3.0.0.alpha0+   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=115012
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 75057    
Attachments: the example file should be opened with LibreOffice and Microsoft Office for comparison
Screenshot about the bug, from LO and MSO side by side
writer string cell values imported as zero
Configuration window of text to number conversion in Calc

Description NISZ LibreOffice Team 2019-03-04 12:13:28 UTC
Description:
If there is a cell with a string value (for example asdf1 or 2text_), in a line chart it appears as a gap in LibreOffice, but in MSO it appears as 0 value.

Steps to Reproduce:
    1. Fill a column with some data (for example: 1, string1, empty cell, 2string, 3)
    2. Select the area of the data sequence
    3. Click on Insert menu and select chart
    4. Chose line in the chart type selection, then select points and lines or lines only
    5. Click on finish
    6. Open the file in Calc and Excel and compare them

Actual Results:
In Calc, there are no lines between 1, string1 and 2string, 3 values, but there will be in Excel.

Expected Results:
If a cell has string value, it should be interpreted as 0 value in a line chart, in this example there should be lines between values 1, string1 and 2string, 3.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 NISZ LibreOffice Team 2019-03-04 12:14:12 UTC
Created attachment 149712 [details]
the example file should be opened with LibreOffice and Microsoft Office for comparison
Comment 2 NISZ LibreOffice Team 2019-03-04 12:14:41 UTC
Created attachment 149713 [details]
Screenshot about the bug, from LO and MSO side by side
Comment 3 Adam Kovacs 2019-03-04 15:06:32 UTC
Created attachment 149716 [details]
writer string cell values imported as zero

one interesting addition to this, when you open a docx file in writer, which contains a chart with string cell values, they will be converted to zero
Comment 4 László Németh 2019-03-05 09:27:52 UTC
What about the default conversion of strings and string formulas containing numbers, eg. '56, ="13"?

Conversion depends from the Formula settings of Calc (see the attached screenshot), and Excel has got similar settings: https://www.extendoffice.com/documents/excel/4374-excel-skip-blanks-in-chart.html
Comment 5 László Németh 2019-03-05 09:28:50 UTC
Created attachment 149734 [details]
Configuration window of text to number conversion in Calc
Comment 6 László Németh 2019-03-12 12:23:16 UTC
Fixed with a workaround, using use-zero chart:treat-empty-cells setting, if it's possible. Special cases, when the data source contains also empty cells, not only no-gap empty values or strings, need other solution:

https://git.libreoffice.org/core/+/f684c074d5f66c8b1546a626766bc045c04cebc3%5E%21