Bug 46262 - FILEOPEN: Cannot open Excel 2003 XML file with UTF-8 BOM
Summary: FILEOPEN: Cannot open Excel 2003 XML file with UTF-8 BOM
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Maxim Monastirsky
URL:
Whiteboard: BSA target:4.3.0
Keywords:
: 60336 (view as bug list)
Depends on:
Blocks: MSO-XML2003
  Show dependency treegraph
 
Reported: 2012-02-18 13:16 UTC by Yogurt
Modified: 2018-03-10 07:13 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
An example file (82.47 KB, text/xml)
2012-02-18 13:16 UTC, Yogurt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yogurt 2012-02-18 13:16:27 UTC
Created attachment 57250 [details]
An example file

Problem description: When I try to open Excel XML files from LibO Calc (explicitly specifying the Excel 2003 XML file type), an "ASCII Filter Settings" dialog pops up, and the XML file is opened in LibO Writer as a text file.

The same file works perfectly with LibO 3.4.5 and earlier versions on the same machine.

I did a clean reinstall with 3.5.0, removing 3.4.5 first.

Steps to reproduce:
1. Start LibO Calc 3.5.0.
2. File/Open/set file type to "Microsoft Excel 2003 XML"
3. Select attached file.
4. Press OK on the ASCII Filter Settings dialog.

Current behavior: Opens as text file in LibO Writer.

Expected behavior: Opens as a spreadsheet in LibO Calc.

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Comment 1 Yogurt 2012-02-19 09:59:49 UTC
There might be some problems with the attachment. I've tried it with LibO 3.4.0 and that version did not open it. (No ASCII Filter dialog, no XML text in Writer, only an empty Writer document.)
Comment 2 d4Mn3d 2012-03-08 03:33:04 UTC
The same problem for me. I tried this with win 7 x64, win xp x86, Mac Snow Leopard and Lion.

Work fine with LibO 3.4.5 for me too.
Comment 3 Yogurt 2012-04-16 04:49:33 UTC
Still not working in 3.5.2.
Comment 4 Jean-Baptiste Faure 2012-07-10 12:35:57 UTC
Problem still there in LO 3.6.0.0beta3+
If try to insert the bugdoc in a sheet, I get the following error message in the terminal :
Entity: line 1: parser error : Start tag expected, '<' not found
ineStyle="Continuous" ss:Weight="1"
^

Steps to reproduce:
- start LO in a terminal
- open a blank spreadsheet
- menu Insert > Sheet from a file
- choose the xml file previously saved on the HD

Tested under Ubuntu 11.10 x86_64
Version 3.6.0.0.beta3+ (Build ID: eba3ef8)

Markus or Kohei: please, could you have a look?

Best regards. JBF
Comment 5 Jean-Baptiste Faure 2012-07-10 13:22:01 UTC
Seems to be a duplicate of bug 35078.
Comment 6 Kohei Yoshida 2012-07-10 13:23:46 UTC
Just FYI, I have zero interest in fixing the current XSLT-based filters, which this one is.  My opinion is to just disable all XSLT-based filters altogether, including Excel 2003 XML.
Comment 7 Kohei Yoshida 2012-07-10 13:24:34 UTC
IMO we should write a real C++ filter for this *if* Excel 2003 XML is truly worth it.
Comment 8 Jesus 2012-08-03 08:41:44 UTC
I had the same issue and when I was going to open a new case I have seen that it is already openend here.

I have put in dropbox two examples, 
One that open because it is a small file:
http://dl.dropbox.com/u/30880870/prueba.xls
One that won't open becuase it is big:
http://dl.dropbox.com/u/30880870/prueba2.xls

I have tested with the same behaviour in XP and W7. and in LibreOffice 3.5 and 3.6.0.4
Comment 9 Stuart Prescott 2012-10-23 22:58:07 UTC
Removing the byte-order-mark from the example file attached to this report allows the file to be successfully imported again (3.5.4 debian wheezy packages). This is a regression compared to previous versions of OpenOffice.org where the exact same file is imported correctly.

(And please don't rip out support for file formats that people are using -- I've been able to push the adoption of libreoffice based on the support of this format and if this format disappears, I am unlikely to have the resources to develop support for some other spreadsheet format and would sadly end up having to recommend alternatives instead.)
Comment 10 Maxim Monastirsky 2013-12-05 13:30:58 UTC
*** Bug 70631 has been marked as a duplicate of this bug. ***
Comment 11 Commit Notification 2013-12-08 23:51:23 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

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

fdo#46262 Detect XML files with UTF-8 BOM



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 12 Maxim Monastirsky 2013-12-09 10:55:19 UTC
This particular case of a file encoded as UTF-8 with BOM is fixed with the above commit. There is still a problem with detecting UTF-16 files, but that belongs to Bug 35078.

(In reply to comment #8)
> One that won't open becuase it is big:
> http://dl.dropbox.com/u/30880870/prueba2.xls
I can't reproduce it with LO 4.1.3.2 & master builds under Ubuntu 13.10 & Win7. One problem that might be with large files is Bug 65980, but this file opens for me in ~10 seconds, so it's surely not the case. Anyway this file is ISO-8859-2, so you should open a new bug report if you still have this problem.
Comment 13 Maxim Monastirsky 2013-12-29 09:32:49 UTC
*** Bug 60336 has been marked as a duplicate of this bug. ***
Comment 14 windowstechsupport 2018-03-10 07:13:33 UTC
This may be a window problem I guess when I am not able to access my excel on my Pc. So I contact https://babasupport.org/microsoft/windows-customer-service/150 which help me in this.I love to share this with all of you hope it is helpful.When I get an attachment problem and other excel your article helps me more.