Bug 148812 - [FILEOPEN] [FILESAVE] XLS -> XLSX bad translation of defined names
Summary: [FILEOPEN] [FILESAVE] XLS -> XLSX bad translation of defined names
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xls, filter:xlsx
Depends on:
Blocks: XLSX-Corrupted
  Show dependency treegraph
 
Reported: 2022-04-26 21:34 UTC by SheetJS
Modified: 2023-01-31 12:46 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
specimen (5.50 KB, application/vnd.ms-excel)
2022-04-26 21:34 UTC, SheetJS
Details

Note You need to log in before you can comment on or make changes to this bug.
Description SheetJS 2022-04-26 21:34:05 UTC
Description:
LO can read files with "\x2e" (".") in defined names from an XLS file.  When saving the files to XLSX, those characters are replaced with "\x5f" ("_").  It may be an issue with the XLS import filter or the XLSX export filter.  Since the test files were generated using LibreOffice save as XLS, the XLS export filter does not exhibit the issue.

Steps to Reproduce:
Open attachment and save as XLSX, then try opening the file in Excel

Actual Results:
File opens

Expected Results:
Excel reports file is invalid


Reproducible: Always


User Profile Reset: Yes



Additional Info:
The XLS file has the correct defined name:

```js
> require("xlsx").readFile("locrash.xls")?.Workbook?.Names?.map(x => x.Name)
[ '_xlfn.UNICHAR' ]
```

The generated XLSX does not:

```js
> require("xlsx").readFile("locrash.xlsx")?.Workbook?.Names?.map(x => x.Name)
[ '_xlfn_UNICHAR' ]
```

(note that the "." was replaced with "_")
Comment 1 SheetJS 2022-04-26 21:34:42 UTC
Created attachment 179795 [details]
specimen
Comment 2 Buovjaga 2023-01-31 12:46:16 UTC
I guess I repro as office.com says:
Removed Records: Named range from /xl/workbook.xml part (Workbook)

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a345952daf3238066ecb1a9c67bb6a3640a6299a
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 31 January 2023