Bug 125342 - Excel 5.0/95 XLS File shows messy code in Calc
Summary: Excel 5.0/95 XLS File shows messy code in Calc
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-17 14:36 UTC by Kevin Suo
Modified: 2023-05-29 20:05 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Test XLS file (18.50 KB, application/vnd.ms-excel)
2019-05-17 14:36 UTC, Kevin Suo
Details
Expected result screenshot (in MS Excel) (50.23 KB, image/png)
2019-05-17 14:39 UTC, Kevin Suo
Details
Bug result in Calc (90.75 KB, image/png)
2019-05-17 14:42 UTC, Kevin Suo
Details
Bug xls resaved as xlsx in Excel (9.19 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2019-05-17 23:47 UTC, Kevin Suo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Suo 2019-05-17 14:36:40 UTC
Created attachment 151486 [details]
Test XLS file

Calc shows messy code when open the attached xls file.

This file was from an Financial Accounting ERP system, with confidential information removed in MS Excel.

The expected cell values are in Simplified Chinese chars, so you need to install at least one Chinese fonts (e.g., Source Han Sans CJK SC or Noto Sans CJK SC).
Comment 1 Kevin Suo 2019-05-17 14:39:27 UTC
Created attachment 151487 [details]
Expected result screenshot (in MS Excel)
Comment 2 Kevin Suo 2019-05-17 14:42:35 UTC
Created attachment 151488 [details]
Bug result in Calc

The cell values are in messy code. However, I noticed that the name of the tab is showing correct Chinese chars.
Comment 3 Eike Rathke 2019-05-17 16:16:52 UTC
Looks like a wrong text encoding was used during import. It may already help to save the file in Excel as .xlsx instead of .xls, the binary .xls file format is notoriously known for not properly indicating which encoding is used for stored strings, especially if written by 3rd party software and not Excel, but even then..
Comment 4 Kevin Suo 2019-05-17 23:47:02 UTC
Created attachment 151492 [details]
Bug xls resaved as xlsx in Excel

> It may already help to save the file in Excel as .xlsx instead of .xls
See attached. The resaved xlsx file can be open in Calc without any problem.
Comment 5 Xisco Faulí 2019-05-22 15:58:41 UTC
Also reproduced in

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 6 QA Administrators 2021-05-22 04:23:32 UTC Comment hidden (obsolete)
Comment 7 Po-Yen Huang 2022-01-28 02:58:46 UTC
Same results for Big5 (MS Codepage 950) files.
Comment 8 BogdanB 2023-05-29 20:05:26 UTC
Everything is fine now.

Tested with
Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: fc4f7db59152f606b6aa88cf32197700959d0f8b
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

Please retest with 7.6, and if you can reproduce this bug, please change the status to New.