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
Created attachment 163102 [details] The example file edited in LO7 with one more character in the header
Created attachment 163103 [details] The two example files in Calc
Created attachment 163104 [details] Opening the file with 255 character long header in Excel gives invalid contents warning
Created attachment 163105 [details] Warning from Excel when the limit is reached at editing time Something like this would be nice to have.
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.
I'd classify this as a bug, since it creates a corrupt file. Confirmed using LO 7.1.0.0.alpha1+ (f27c4ec5c864395f4cdaec32d7e95ff24e4f43c8) / Windows.
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