Description: Open the attached XLS file and save it as XLSX in LibreOffice. Excel throws an error when opening the resulting file. OOXML Validator gives the below error ``` { "Description": "The attribute 'val' has invalid value 'Cumberland;Cumberland AMT;Courier New;Cousine;Liberation Mono;Nimbus Mono L;DejaVu Sans Mono;Bitstream Vera Sans Mono;Courier;Lucida Sans Typewriter;Lucida Typewriter;Monaco;Monospaced'. The actual length is greater than the MaxLength value. The length must be smaller than or equal to 31.", "Path": { "Namespaces": {}, "XPath": "/x:styleSheet[1]/x:fonts[1]/x:font[5]/x:name[1]", "PartUri": "/xl/styles.xml" }, "Id": "Sem_AttributeValueDataTypeDetailed", "ErrorType": "Schema" } ``` The font name exceeds maximum length of 31. But I couldn't find where this is specified. Schema related to font element is specified in (ISO-IEC-29500-1 2016, 18.8.22). But there is no limit on font-name length. Limiting the font-name to 31 in `styles.xml` fixes the issue Steps to Reproduce: 1. Open the attached XLS file 2. Save it as XLSX 3. Open the resulting file in Excel Actual Results: Excel throws an error when opening the file Expected Results: Excel opens the file without any problem Reproducible: Always User Profile Reset: Yes Additional Info: Version: 25.8.3.2 (X86_64) Build ID: 8ca8d55c161d602844f5428fa4b58097424e324e CPU threads: 22; OS: Linux 6.12; UI render: default; VCL: gtk3 Locale: en-IN (en_IN); UI: en-US Calc: threaded
Created attachment 204995 [details] XLS File
Karthik Godha committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/6cb419f2dc829abf6472c4407afb8c09a9571ac3 tdf#170287: XLS->XLSX Limit font-name length to 31 It will be available in 26.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Karthik Godha committed a patch related to this issue. It has been pushed to "libreoffice-26-2": https://git.libreoffice.org/core/commit/84c1427aca2dca7189840160c4e877cd73ae0d4c tdf#170287: XLS->XLSX Limit font-name length to 31 It will be available in 26.2.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
*** Bug 129367 has been marked as a duplicate of this bug. ***