Bug 114291 - FILEOPEN: General Error opening Excel 2003/XML file
Summary: FILEOPEN: General Error opening Excel 2003/XML file
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.7.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard: target:6.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-06 18:59 UTC by jeanmarcranger
Modified: 2018-02-19 14:25 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example of problematic file. (19.78 KB, application/xml)
2017-12-06 19:00 UTC, jeanmarcranger
Details
printscreen from excel 2010 (7.80 KB, image/png)
2017-12-14 21:27 UTC, raal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jeanmarcranger 2017-12-06 18:59:48 UTC
Description:
The soon-to-be-attached file fails to open with a "General Error"/"General input/output error" message.
File comes from the discount broker branch of Canada's Royal bank. They've been notified of the error but claims that the file opens successfully in Excel 2013 and may or may not fix it.
Upon investigation, I found that the file contains French symbols encoded as Windows-1252, but fails to state so in the header - therefore Calc assumes that content is UTF-8 and fails.
Modifying the file by replacing the original <?xml version="1.0"?> header by <?xml version="1.0" encoding="Windows-1252"?> fixes the issue.
Given that this can be considered a malformed file, I'm not sure whether it should be addressed or not.
Tested on 5.3.7.2 release. Not tested on newer pre-release versions.


Steps to Reproduce:
Double click file to open it.

Actual Results:  
"General Error"/"General input/output error"

Expected Results:
File opens.


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
Comment 1 jeanmarcranger 2017-12-06 19:00:46 UTC
Created attachment 138252 [details]
Example of problematic file.
Comment 2 Jacques Guilleron 2017-12-07 16:39:01 UTC
Hi jeanmarcranger,

Opened as export.xml, there is no issue here.
Wasn't it the real file extension?
Comment 3 jeanmarcranger 2017-12-07 18:46:46 UTC
Original extension was xls. I just re-downloaded the attached file, and I have the same issue regardless if it's named export.xls or export.xls.xml.
I initially saw the bug on a 5.3.6.x build on Windows7/x64, but I upgraded to the latest release and retested before reporting.
Actually, I initially saw the bug on my Debian machine (LibreOffice 5.4.2 from Debian Backports), but since this isn't an official DocumentFoundation build, that one doesn't count.
The fix (adding "encoding=") was found a week or two ago, tested on Linux/5.4.2 and Windows/5.3.6 then, and Windows/5.3.7 yesterday.
Both Debian and Win7 are configured in English, but may be using some French regional settings. English version of LibreOffice on both. I believe the Windows version doesn't have any French extensions installed, but the Linux version have some.
I'm missing something here.
Comment 4 jeanmarcranger 2017-12-07 19:03:23 UTC
Following tests were done with xls extension only.
Upgraded Win7/x64 to 5.4.3.2. Same issue.
Installed Win7/x64 6.0.0.0beta1. Same issue. Restared in safe mode, "restore from backup" variant, both checkbox are unchecked and grayed out. Same issue.

File sometimes opened by double-clicking, sometimes with file->open. Can't believe it can matter, but...

Not sure what else I can test at this time.
Comment 5 raal 2017-12-14 21:27:22 UTC
I can reproduce it with Version: 6.1.0.0.alpha0+
Build ID: aa28b54ab568fb7160095bb4a2fec338b1398b43
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: x11;


errors in command line:
Entity: line 1: parser error : Input is not proper UTF-8, indicate encoding !
Bytes: 0xE8 0x72 0x65 0x3C
Cell><Data ss:Type="String">Name</Data></Cell><Cell><Data ss:Type="String">Derni
                                                                               ^
Entity: line 1: parser error : Input is not proper UTF-8, indicate encoding !
Bytes: 0xE8 0x72 0x65 0x3C
Cell><Data ss:Type="String">Name</Data></Cell><Cell><Data ss:Type="String">Derni


Excel 2010 can open the file, but column E has weird name: Derni貥
Comment 6 raal 2017-12-14 21:27:45 UTC
Created attachment 138452 [details]
printscreen from excel 2010
Comment 7 Kohei Yoshida 2018-02-19 14:25:08 UTC
I can no longer reproduce this using the current (as of Feb 19, 2018) master branch build.  The cell E1 contains corrupted string character, but other than that, it opens just fine and the rest of the cells looks all fine.