Bug 134855 - EDITING Header text has character limit in Excel which can be broken by Calc
Summary: EDITING Header text has character limit in Excel which can be broken by Calc
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xlsx
Depends on:
Blocks: XLSX-Corrupted
  Show dependency treegraph
 
Reported: 2020-07-16 09:12 UTC by NISZ LibreOffice Team
Modified: 2024-11-09 03:15 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Excel with 253 characters in the header (9.93 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-07-16 09:12 UTC, NISZ LibreOffice Team
Details
The example file edited in LO7 with one more character in the header (5.06 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2020-07-16 09:12 UTC, NISZ LibreOffice Team
Details
The two example files in Calc (81.86 KB, image/png)
2020-07-16 09:13 UTC, NISZ LibreOffice Team
Details
Opening the file with 255 character long header in Excel gives invalid contents warning (39.05 KB, image/png)
2020-07-16 09:14 UTC, NISZ LibreOffice Team
Details
Warning from Excel when the limit is reached at editing time (58.66 KB, image/png)
2020-07-16 09:14 UTC, NISZ LibreOffice Team
Details
attachment #163102 (the invalid xlsx) saved to xls by Calc (6.00 KB, application/vnd.ms-excel)
2020-07-16 09:48 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-07-16 09:12:31 UTC
Created attachment 163101 [details]
Example file from Excel with 253 characters in the header

In Excel there is a limitation on the combined text length of the header/footer text of 255 characters, including the left/center/right parts and all formatting, documented in [MS-OI29500] under:
2.1.619 Part 1 Section 18.3.1.41, firstFooter (First Page Footer) 
2.1.620 Part 1 Section 18.3.1.42, firstHeader (First Page Header) 
2.1.631 Part 1 Section 18.3.1.57, oddFooter (Odd Page Footer) 
2.1.632 Part 1 Section 18.3.1.58, oddHeader (Odd Header) 

(although
2.1.1455 Part 1 Section 21.2.2.59, evenFooter (Even Footer) 
2.1.1456 Part 1 Section 21.2.2.60, evenHeader (Even Header) 
do not mention it, at least in my copy.)

The Excel GUI enforces this limit at document creation time, but Calc does not. Consequently it is possible to create headers/footers of 255 character or longer, save them as XLSX which causes an “Invalid contents detected” warning in Excel.


Steps to reproduce:
    1. Open attached file in Calc
    2. Go to Insert – Headers and footers
    3. Add one more character to the header, save the file and open it in Excel

Actual results:
Excel detects invalid contents in the file. If you let it fix, it will remove all the sheet properties from /xl/worksheets/sheet1.xml

Expected results:
Calc could have an option to enforce 255 character header / footer length limit at editing time, for OOXML-heavy environments.

LibreOffice details:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: f7eff4319be741143f6d8d5e0f2995e3ce46b126
CPU szálak: 4; OS: Windows 6.3 Build 9600; Felületmegjelenítés: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL
Comment 1 NISZ LibreOffice Team 2020-07-16 09:12:50 UTC
Created attachment 163102 [details]
The example file edited in LO7 with one more character in the header
Comment 2 NISZ LibreOffice Team 2020-07-16 09:13:13 UTC
Created attachment 163103 [details]
The two example files in Calc
Comment 3 NISZ LibreOffice Team 2020-07-16 09:14:05 UTC
Created attachment 163104 [details]
Opening the file with 255 character long header in Excel gives invalid contents warning
Comment 4 NISZ LibreOffice Team 2020-07-16 09:14:48 UTC
Created attachment 163105 [details]
Warning from Excel when the limit is reached at editing time

Something like this would be nice to have.
Comment 5 NISZ LibreOffice Team 2020-07-16 09:48:27 UTC
Created attachment 163108 [details]
attachment #163102 [details] (the invalid xlsx) saved to xls by Calc

Turns out this situation is already handled for xls: too long header text gets truncated without warning, making it work in Excel.

Applying this magic to xlsx could be a compromise too.
Comment 6 Aron Budea 2020-11-08 01:24:26 UTC
I'd classify this as a bug, since it creates a corrupt file.
Confirmed using LO 7.1.0.0.alpha1+ (f27c4ec5c864395f4cdaec32d7e95ff24e4f43c8) / Windows.
Comment 7 QA Administrators 2022-11-09 04:03:02 UTC Comment hidden (obsolete)
Comment 8 QA Administrators 2024-11-09 03:15:09 UTC
Dear NISZ LibreOffice Team,

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