Download it now!
Bug 120288 - FILESAVE XLSX Default font style affects the height of rows in Excel
Summary: FILESAVE XLSX Default font style affects the height of rows in Excel
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xlsx
Depends on:
Blocks: XLSX
  Show dependency treegraph
 
Reported: 2018-10-03 16:16 UTC by Gabor Kelemen
Modified: 2019-03-02 19:57 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
The original XLSX file saved with the default font style settings. (14.16 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-10-03 16:16 UTC, Gabor Kelemen
Details
The modified XLSX file saved with Calibri 11pt as default font style. (14.13 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2018-10-03 16:22 UTC, Gabor Kelemen
Details
The original spreadsheet saved with the default font style settings exported from Microsoft Excel as PDF. (4.99 KB, application/pdf)
2018-10-03 16:23 UTC, Gabor Kelemen
Details
The modified spreadsheet saved with Calibri 11pt as default font style exported from Microsoft Excel as PDF. (95.24 KB, application/pdf)
2018-10-03 16:23 UTC, Gabor Kelemen
Details
A screenshot comparing the two PDF files. The same difference can be observed when the spreadsheets are printed from Excel. (40.35 KB, image/png)
2018-10-03 16:23 UTC, Gabor Kelemen
Details
ODS to start testing from (8.84 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-01-23 12:20 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen 2018-10-03 16:16:27 UTC
Created attachment 145352 [details]
The original XLSX file saved with the default font style settings.

Custom row heights in Microsoft Excel are affected by the default text style set in LibreOffice Calc. LibreOffice Calc uses 10 pt Liberation Sans as its default font. When a spreadsheet created in Calc is saved as XLSX and opened in Microsoft Excel, the row heights appear a bit smaller. The difference isn't obvious at first sight, but it can cause 1-2 cm difference in how the same spreadsheet is rendered by the end of the first page.

The strange thing is, that when the height of the row is checked manually in Excel, it shows (almost) the correct value (with some rounding differences), for example 0,99 cm instead of 1 cm. Printing the document and measuring the rows with a ruler makes it obvious, that in reality the real height of a row is close to 0,93 cm, so the displayed value in Microsoft Excel is incorrect.

If we change the default font style in LibreOffice Calc to Calibri 11pt, save the same spreadsheet again as XLSX, and open it in Excel, the rows are rendered (and printed) exactly as in Calc. It doesn't matter what characters and font sizes are actually used in the spreadsheet, changing the default is enough, even when the default style is not actively used in any cells with content.



Steps to reproduce:

    1. Create a new spreadsheet in LibreOffice Calc. Write something in the first ten rows (like numbers from 1 to 10).
    2. Change the row height for the first then rows to 1 cm.
    3. Save the file as XLSX.
    4. Print the file from LibreOffice Calc and Microsoft Excel and compare the results.
    5. Open the XLSX again in Calc, change the default font style in the Styles and formatting sidebar to Calibri 11.
    6. Save the document again as XLSX, preferably with a new filename to keep the original file for comparison.
    7. Print the spreadsheet from LibreOffice Calc and Microsoft Excel and compare the results again.

Actual results:
The default font style set in LibreOffice Calc affects the height of the rows in Microsoft Excel.

Expected results:
The default font style set in LibreOffice Calc shouldn't affect the height of the rows in Microsoft Excel.

LibreOffice details:
Version: 6.2.0.0.alpha0+
Build ID: 52cb73911e661fb636085337374e09845f07783b
CPU threads: 1; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-10-02_01:05:50
Locale: hu-HU (hu_HU); Calc: threaded
Comment 1 Gabor Kelemen 2018-10-03 16:22:56 UTC
Created attachment 145353 [details]
The modified XLSX file saved with Calibri 11pt as default font style.
Comment 2 Gabor Kelemen 2018-10-03 16:23:17 UTC
Created attachment 145354 [details]
The original spreadsheet saved with the default font style settings exported from Microsoft Excel as PDF.
Comment 3 Gabor Kelemen 2018-10-03 16:23:32 UTC
Created attachment 145355 [details]
The modified spreadsheet saved with Calibri 11pt as default font style exported from Microsoft Excel as PDF.
Comment 4 Gabor Kelemen 2018-10-03 16:23:47 UTC
Created attachment 145356 [details]
A screenshot comparing the two PDF files. The same difference can be observed when the spreadsheets are printed from Excel.
Comment 5 Buovjaga 2019-01-23 12:20:40 UTC
Created attachment 148553 [details]
ODS to start testing from

I repro.

MSO 2013
LibO Version: 6.3.0.0.alpha0+
Build ID: 301ff4dfb82dfd961b993aec151784bd478b4f97
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-01-22_22:44:18
Locale: fi-FI (fi_FI); UI-Language: en-US
Calc: threaded
Comment 6 Buovjaga 2019-01-23 12:22:33 UTC
Gábor: would be cool, if you could regression test.
Comment 7 NISZ LibreOffice Team 2019-02-13 10:49:05 UTC
Reproduciable with:

LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735