Download it now!
Bug 129367 - FILESAVE An exported XLSX contains too long font name, and can't be opened in Excel
Summary: FILESAVE An exported XLSX contains too long font name, and can't be opened in...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.0.6.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xlsx
Depends on:
Blocks: Font-Substitution XLSX-Corrupted
  Show dependency treegraph
 
Reported: 2019-12-13 10:21 UTC by Roman Kuznetsov
Modified: 2019-12-16 06:19 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Bad XLSX file (5.06 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2019-12-13 10:22 UTC, Roman Kuznetsov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Kuznetsov 2019-12-13 10:21:47 UTC
Description:
calc creates a wrong XLSX file that opens with an error in MS Excel

Steps to Reproduce:
1. Open ODS from https://bugs.documentfoundation.org/attachment.cgi?id=156545
2. Save it as XLSX file
3. Open that XLSX file in MS Excel 2013
4. You'll see message about nonreadable content. If you'll press OK button then Excel will open your XLSX file

Actual Results:
Excel shows me error message and repair a file

Expected Results:
XLSX file should opens without any errors in Excel


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.5.0.0.alpha0+ (x64)
Build ID: ff566c67d67e96c97bcf4064b39df6998733c84e
CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; 
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded
Comment 1 Roman Kuznetsov 2019-12-13 10:22:38 UTC
Created attachment 156547 [details]
Bad XLSX file
Comment 2 Roman Kuznetsov 2019-12-13 10:32:37 UTC
repro in 5.0.6 also
Comment 3 Julien Nabet 2019-12-13 15:02:09 UTC
On Win10 with master sources updated today + Excel 2016, I could reproduce this.

I saw nothing in LO logs which could help and didn't see anything in event viewer for Excel part.
Comment 4 Aron Budea 2019-12-15 06:12:46 UTC
The font for B3 is: 'Liberation Mono;Courier New;DejaVu Sans Mono;Lucida Sans Typewriter'

Open XML SDK 2.5 complains that this is longer than MaxLength, which is 31. I don't know the exact specs, but unzipping the XLSX and trimming this very long font name inside xl/styles.xml, and then rezipping it produces a correct XLSX file.
Comment 5 Roman Kuznetsov 2019-12-15 06:25:26 UTC
(In reply to Aron Budea from comment #4)
> The font for B3 is: 'Liberation Mono;Courier New;DejaVu Sans Mono;Lucida
> Sans Typewriter'
> 

But why and how could I set up several fonts for one cell in one time?

> Open XML SDK 2.5 complains that this is longer than MaxLength, which is 31.
> I don't know the exact specs, but unzipping the XLSX and trimming this very
> long font name inside xl/styles.xml, and then rezipping it produces a
> correct XLSX file.

Yeah, Excel make it when opens the file. I mean Excel cleans styles.xml file in that case itself
Comment 6 Aron Budea 2019-12-16 06:19:04 UTC
(In reply to Roman Kuznetsov from comment #5)
> But why and how could I set up several fonts for one cell in one time?
"You can enter several fonts, separated by semicolons. LibreOffice uses each named font in succession if the previous fonts are not available."
https://help.libreoffice.org/Common/Font_Name

I think in some cases this could happen automatically, but not sure when. Not to this extent, just one font plus one fallback. Don't take my word for it, though.