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: 2024-01-08 03:12 UTC (History)
2 users (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.
Comment 7 QA Administrators 2021-12-16 04:08:32 UTC Comment hidden (obsolete)
Comment 8 Roman Kuznetsov 2022-01-07 15:43:24 UTC
Strange...

Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 1be170d0629cf761f0ee4173007a3c021966546e
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

MSO 2007 opens the genered XLSX file without any errors, but MSO 2013 is trying change the styles.xml file

So still repro I think
Comment 9 QA Administrators 2024-01-08 03:12:20 UTC
Dear Roman Kuznetsov,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug