Bug 170189 - FILESAVE: XLS -> XLSX invalid font in styles.xml
Summary: FILESAVE: XLS -> XLSX invalid font in styles.xml
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
26.8.0.0 alpha0+ master
Hardware: All All
: medium normal
Assignee: Karthik
URL:
Whiteboard: target:26.8.0 target:26.2.1
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-01 10:10 UTC by Karthik
Modified: 2026-01-30 08:46 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
XLS File (75.00 KB, application/vnd.ms-excel)
2026-01-01 10:10 UTC, Karthik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Karthik 2026-01-01 10:10:06 UTC
Description:
Open the attached XLS file and save it as XLSX, the resulting file can't be opened in Excel

OOXML Validator gives the below error
```
{
    "Description": "The attribute 'val' has invalid value ''. The attribute value cannot be empty.",
    "Path": {
      "Namespaces": {},
      "XPath": "/x:styleSheet[1]/x:fonts[1]/x:font[5]/x:name[1]",
      "PartUri": "/xl/styles.xml"
    },
    "Id": "Sch_AttributeValueDataTypeDetailed",
    "ErrorType": "Schema"
}
```
<font> element in the styles.xml has empty name, which is not a valid schema


Steps to Reproduce:
1. Open the attached XLS file
2. Save it as XLSX
3. Open the resulting file in Excel

Actual Results:
Excel fails to open 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
Comment 1 Karthik 2026-01-01 10:10:54 UTC
Created attachment 204887 [details]
XLS File
Comment 2 Commit Notification 2026-01-27 13:29:22 UTC
Karthik Godha committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8e285dd22fed82b7c4554d336c03cd7b6bc0ce4d

tdf#170189: XLS->XLSX empty font-name in export

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.
Comment 3 Commit Notification 2026-01-29 15:42:14 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6d720dc579bd2c3222aecafb905c0d08e44daa77

tdf#170189: sc_subsequent_export_test2: Add test

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.
Comment 4 Commit Notification 2026-01-30 08:46:05 UTC
Karthik Godha committed a patch related to this issue.
It has been pushed to "libreoffice-26-2":

https://git.libreoffice.org/core/commit/e0acc3043517216bdfc9ebe9ad7d8a15bc74aa61

tdf#170189: XLS->XLSX empty font-name in export

It will be available in 26.2.1.

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.