Bug 35208 - FILEOPEN: Excel 2.0-4.0 (.xls) files show messy code (because of missing CODEPAGE record)
Summary: FILEOPEN: Excel 2.0-4.0 (.xls) files show messy code (because of missing CODE...
Status: RESOLVED DUPLICATE of bug 132796
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xls
Depends on:
Blocks: CJK
  Show dependency treegraph
 
Reported: 2011-03-11 04:28 UTC by 孔南
Modified: 2020-12-30 03:38 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
decode error? (73.45 KB, application/vnd.ms-excel)
2011-03-11 04:35 UTC, 孔南
Details
this one is "BIFF2 MS Excel 2.1 Worksheet" (1.15 KB, application/vnd.ms-excel)
2011-03-11 05:01 UTC, 孔南
Details

Note You need to log in before you can comment on or make changes to this bug.
Description 孔南 2011-03-11 04:28:27 UTC
[Sorry for my poor English]

When open the attachment with LibO, the DBCS became unreadable.
HexBrowser consider it as "BIFF5/7/8 MS Excel 9x/2000/XP Worksheet". 

ASCII (“细”) -> CF B8 。 LibO : CF ->  Ï ,B8 -> ¸ 。
ASCII (“粒”) -> C1 A3 。 LibO : C1 -> Á ,A3 -> £ 。

So, "细粒" becomes  "ϸÁ£",that's too bad...

Can anybody help me? Thanks!!!!!!

[Sorry for my poor English]
Comment 1 孔南 2011-03-11 04:35:36 UTC
Created attachment 44347 [details]
decode error?
Comment 2 孔南 2011-03-11 05:01:52 UTC
Created attachment 44348 [details]
this one is "BIFF2 MS Excel 2.1 Worksheet"
Comment 3 Yifan Jiang 2011-03-15 00:35:48 UTC
Hi Kong Nan,

Is there a source info how did you generate the fils. It looks MS Office 2007 doesn't understand the characters either.

Hi Kohei,

Any ideas of this? Thanks!
Comment 4 孔南 2011-03-15 03:44:33 UTC
[Sorry for my poor English]

Oh, excel2003/2007 can show these files properly. In excel2003's "save-as" dialog, the file type is "Excel 2.1 Worksheet".

Fakexls3.xls was generated with "RuiMei laboratory information system".
http://ruimei.com.cn/cases_more.asp?id=1113

1.xls was uploaded from OOo community forum.
http://user.services.openoffice.org/zh/forum/viewtopic.php?f=7&t=998

[Sorry for my poor English , and 我己给您发了中文邮件 ]
Comment 5 lennart.borgman 2011-06-16 04:02:41 UTC
Here are some more example of .xls files that can't be opened correctly. You can not move around in the spreadsheets:

http://www.aftonbladet.se/nyheter/article13180899.ab
Comment 6 Björn Michaelsen 2011-12-23 11:51:16 UTC Comment hidden (obsolete)
Comment 7 孔南 2011-12-27 02:27:35 UTC
Bug still exists. Tested with LOdev 3.5.0beta2.
Comment 8 Zeki Bildirici 2014-01-18 22:04:45 UTC
Still reproducable on Ubuntu 13.10 x64, LibreOffice Version: 4.2.0.1
Build ID: 420m0(Build:1)

Best regards,
Zeki
Comment 9 retired 2014-01-19 09:06:50 UTC
 孔南 or Zeki, can you please post exact reproduce steps and write down what exactly to look for?
Comment 10 Maxim Monastirsky 2014-01-19 14:49:45 UTC
When I open the attached files with Excel 2010 SP2 I get *exactly* the same results as in LO. So the problem is in those files. Closing as NOTOURBUG.
Comment 11 Urmas 2014-01-24 11:02:15 UTC
File is opened fine with Excel 97.

Cell contain stuff like this:
粉砂质泥岩岩
浅灰色3井岩
马103井岩
Comment 12 Joel Madero 2014-11-04 03:05:26 UTC
Looks like this was confirmed by Urmas - moving to NEW as REOPENED is only if the bug is assigned to someone which this one is not.
Comment 13 Maxim Monastirsky 2015-12-09 22:20:04 UTC
*** Bug 94382 has been marked as a duplicate of this bug. ***
Comment 14 Maxim Monastirsky 2015-12-09 22:20:32 UTC
*** Bug 96330 has been marked as a duplicate of this bug. ***
Comment 15 Kevin Suo 2015-12-10 02:25:04 UTC Comment hidden (obsolete)
Comment 16 Commit Notification 2016-05-18 21:03:34 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4f1ce46b8d65360436e09750242101b566e6186c

tdf#35208 Allow choosing encoding for old Excel files

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Maxim Monastirsky 2016-05-18 21:21:33 UTC
Solved by introducing a new "Microsoft Excel - Choose Encoding" entry in the file picker, which will open a window with encoding list to choose from.
Comment 18 Maxim Monastirsky 2016-05-18 21:22:27 UTC
*** Bug 90210 has been marked as a duplicate of this bug. ***
Comment 19 Maxim Monastirsky 2016-05-19 10:27:52 UTC
The patch is going to be reverted, so back to NEW.
Comment 20 Commit Notification 2016-05-19 11:12:59 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=373ef6eeb026a03b2198c3517d23daf282189702

Revert "tdf#35208 Allow choosing encoding for old Excel files"

It will be available in 5.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 21 leaies 2016-05-31 10:07:28 UTC
The early versions of Microsoft Office save their document as ANSII. maybe they check stealthy that is ANSII or not ,but ...... yes they save them as the ANSII.

So when you check what codepage that it is, you maybe get the Null value sometime. and if you set the null to the some codepage internal ,you will get the error at somewhere.

So we will need change it manually way to fix ,when we got the error.
Comment 22 Kevin Suo 2016-09-30 03:23:49 UTC Comment hidden (obsolete)
Comment 23 vihsa 2017-08-19 07:32:10 UTC
bug still seems to be existing

see comment (3) on tdf#111406
Comment 24 QA Administrators 2018-08-20 02:32:28 UTC Comment hidden (obsolete)
Comment 25 Kevin Suo 2018-08-20 06:54:56 UTC
(In reply to QA Administrators from comment #24)

Bug still exists in the most recent versions.
Comment 26 QA Administrators 2019-09-02 09:27:18 UTC Comment hidden (obsolete)
Comment 27 Kevin Suo 2020-12-30 03:38:20 UTC
A reverse bibisect using repo
https://go.suokunlong.cn:88/cgit/lo/bibisect-linux-64-7.1-CN/

has identified the following range:
75edcfc0569ca76fa22db451fd61138e52870a62..ac0112ecefd64094b150390fc36f9f56d19a4d87

and then point to the following commit which had fixed this bug:
author Mike Kaganski <mike.kaganski@collabora.com>	2020-05-07 09:26:42 +0300
committer Mike Kaganski <mike.kaganski@collabora.com>	2020-05-07 12:23:40 +0200
commit	ac0112ecefd64094b150390fc36f9f56d19a4d87 (patch)
tdf#132796: use LO language settings to set default XLS language

Reverse bibisect log:

$ git bisect log
# bad: [2ed31df5900ee5d392affe07497c37d6b578af99] 2020-05-30 20:49:16 +0200 80c9fae6aa8638e192e5b622d12305b304890b43
# good: [d7a13672346cb2c99df3ff6fba47ef6c73d853e0] 2019-11-13 16:51:24 +0100 9bc848cf0d301aa57eabcffa101a1cf87bad6470
git bisect start 'master' 'oldest'
# good: [a402e0e4f0191597c5715d69257e5b8f2aea612d] 2020-03-10 09:26:19 +0100 edf13fe1247e7ef411a9ff5435385573fad01f56
git bisect good a402e0e4f0191597c5715d69257e5b8f2aea612d
# good: [cc1dcc2c749e84c163897145b461dc6c7ae3d689] 2020-04-23 20:36:26 +0200 92b7e0fd668f580ca573284e8f36794c72ba62df
git bisect good cc1dcc2c749e84c163897145b461dc6c7ae3d689
# bad: [f63bc8a6e3336816bd8ffa52fce14b552119bd47] 2020-05-11 14:34:48 +0200 da1de29f8410d352884688bd76bd07ca1c8f6ecd
git bisect bad f63bc8a6e3336816bd8ffa52fce14b552119bd47
# good: [ebc91118295b44c285d864d09ac528d896915083] 2020-05-05 05:10:47 +0200 f14691683900f6b28737be8c599e1ee4e8386e14
git bisect good ebc91118295b44c285d864d09ac528d896915083
# bad: [74941347ed2b75f89a2a764aee7ffb4c09f0d5fe] 2020-05-08 14:51:19 +0200 80d44afd085c5f35e9f4698679885087318fc65d
git bisect bad 74941347ed2b75f89a2a764aee7ffb4c09f0d5fe
# good: [5a300d2afcc2967ff0f32902346d8ddbaebfae34] 2020-05-06 18:39:59 +0200 65b7873aab5deec7157328047e869a6385e0a74a
git bisect good 5a300d2afcc2967ff0f32902346d8ddbaebfae34
# bad: [161df2d2d15fe522d4e1b96644d42c6199f310c8] 2020-05-07 15:34:53 +0200 58c87f8261abf4f1528a43dc501e956cb9c1d2f2
git bisect bad 161df2d2d15fe522d4e1b96644d42c6199f310c8
# good: [31ef17c106f7de30d11812a353521eec3d649d51] 2020-05-07 07:08:44 +0200 d7edac51367fe92c2659afdfd6e4d7c771dc5229
git bisect good 31ef17c106f7de30d11812a353521eec3d649d51
# good: [9b11df227bf5233730a3aae7b7e176662ad16182] 2020-05-07 10:58:53 +0200 75edcfc0569ca76fa22db451fd61138e52870a62
git bisect good 9b11df227bf5233730a3aae7b7e176662ad16182
# bad: [62772e502e6d857198bb05dc64973ec95a19b72f] 2020-05-07 15:21:21 +0200 403776b17706107001d49cf5eed3c4415c4d8b9d
git bisect bad 62772e502e6d857198bb05dc64973ec95a19b72f
# bad: [d92d1063a594b80d28ffbefb0e55aad74a15fdcd] 2020-05-07 12:23:40 +0200 ac0112ecefd64094b150390fc36f9f56d19a4d87
git bisect bad d92d1063a594b80d28ffbefb0e55aad74a15fdcd
# first bad commit: [d92d1063a594b80d28ffbefb0e55aad74a15fdcd] 2020-05-07 12:23:40 +0200 ac0112ecefd64094b150390fc36f9f56d19a4d87

Mark as duplicate of bug 132796.

*** This bug has been marked as a duplicate of bug 132796 ***