Bug 53834

Summary: FILEOPEN: Raw content.xml files not supported
Product: LibreOffice Reporter: Nicholas Shanks <nickshanks>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: RESOLVED WONTFIX    
Severity: minor CC: erack, michael.stahl, momonasmon
Priority: medium    
Version: 3.6.0.4 release   
Hardware: Other   
OS: All   
Whiteboard: BSA
Crash report or crash signature: Regression By:

Description Nicholas Shanks 2012-08-20 10:43:14 UTC
Problem description: 
I have a script which is exporting an OpenDocument-format XML file containing an <office:spreadsheet>
I do not have any need for the style or metadata information that a full ods archive contains, so I am not creating that.
LibreOffice cannot read the file I create.

Steps to reproduce:
1. Extract a content.xml file from any .ods archive
2. (optional) Compress the file again with DEFALTE and a zip header.
2. Launch Calc and try to Open... this file, OR
3. Rename the file to Anything.ods and double-click it

Current behavior:
LibreOffice treats the file as a CSV/TSV file and tries to import fields/rows from it as such.

Expected behavior:
LibreOffice would recognise the file as (perhaps compressed) XML and try to interpret it as an OpenDocument spreadsheet.

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.6 Safari/537.4
Comment 1 Sören 2012-12-26 21:15:25 UTC
I can confirm that the problem still exists in
Version 4.0.0.0.beta2 (Build ID: 4104d660979c57e1160b5135634f732918460a0)
on Ubuntu 12.04 (x86)
Comment 2 Michael Stahl (allotropia) 2014-12-03 13:48:33 UTC
sorry we are not going to support importing a bare content.xml.

what you can do is create a "flat ODF" file that is just a single xml file; the "OpenDocument Spreadsheet Flat XML" should be able to import that.

for details about the format see this section in the ODF 1.2 specification:

 3.1.2 <office:document>(Single OpenDocument XML Files)
Comment 3 Maxim Monastirsky 2014-12-03 14:32:25 UTC
(In reply to Michael Stahl from comment #2)
> sorry we are not going to support importing a bare content.xml.
Well, it's already possible, it just missing type detection. Explicitly choosing flat xml from the types list allows me to open a bare content.xml.