Download it now!
Bug 48941 - xlsx document created with master can't be opened by excel
Summary: xlsx document created with master can't be opened by excel
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Master old -3.6
Hardware: Other All
: medium critical
Assignee: Not Assigned
URL:
Whiteboard: target:3.6.0 target:3.5.3
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-19 18:25 UTC by Markus Mohrhard
Modified: 2012-04-24 12:53 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
test document (6.26 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2012-04-20 02:26 UTC, Markus Mohrhard
Details
test ods file that seems to create problems (7.18 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-04-20 13:36 UTC, Markus Mohrhard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Mohrhard 2012-04-19 18:25:24 UTC
All test documents that I created recently in LibO master can't be opened by Excel 2007.
Comment 1 Markus Mohrhard 2012-04-19 18:26:08 UTC
I checked and it is not related to my conditional formatting work. I build one commit before my patches and it still shows the same problem.
Comment 2 Markus Mohrhard 2012-04-20 02:26:01 UTC
Created attachment 60374 [details]
test document
Comment 3 Markus Mohrhard 2012-04-20 13:36:30 UTC
Created attachment 60406 [details]
test ods file that seems to create problems

Export this file into xlsx and open in excel 2007
Comment 4 Markus Mohrhard 2012-04-20 13:51:13 UTC
Seems to affect 3-5 too.
Comment 5 Markus Mohrhard 2012-04-20 14:50:30 UTC
I know what goes wrong here. We default in 3-5 and master to OOXML export while in 3-4 we still default to Excel 2007 / 2010.

There are some differences in the .rel file that make the file not readable by excel in this case. If you manually choose the right filter this is solved.

I have not yet an idea how to fix this but IMHO we need to default to the old behavior and should fix this already for 3.5.3.
Comment 6 Petr Mladek 2012-04-23 01:57:52 UTC
I am a bit mixed. I guess that the default export is to ODF Spreadsheet (.ods). Then I see both file formats in the "Safe As" dialog:

     + "Office Open XML Spreadsheet (.xlsx)
     + "Microsoft Excel 2007/2010 XML (.xlsx)

, so the user could choose what he wants.

What did I miss? Where is OOXML used by default?
Comment 7 Petr Mladek 2012-04-23 02:11:37 UTC
Marcus just explained it on irc:

If you just create the filename as test.xlsx, do not select any filter, and save the file we try to match the filter.

It used to default to Excel 2007 until LO-3.4. It defaults to OOXML in LO-3.5 and master.
Comment 8 Muthu 2012-04-23 05:30:10 UTC
So, I guess, the behaviour is right then? Obviously saving it in OOXML would make it difficult to open in MSO 2007 and easier in MSO  2010?
Which should be fine?
Comment 9 Markus Mohrhard 2012-04-23 05:39:37 UTC
(In reply to comment #8)
> So, I guess, the behaviour is right then? Obviously saving it in OOXML would
> make it difficult to open in MSO 2007 and easier in MSO  2010?
> Which should be fine?

No. Excel 2010 can open both exported files and excel 2007 can only open files created with our export filter for Excel 2007/2010. The difference in the file is only one entry in an url but this prevents excel 2007 from opening these files.

IMHO we should default to the excel export and only export perfectly standard conform files if the user requests them.
Comment 10 Michael Meeks 2012-04-23 07:26:57 UTC
> IMHO we should default to the excel export and only export perfectly
> standard conform files if the user requests them.

Agreed, usability is king; is there any real/known advantage to using the 2010 format that is incompatible with 2007 ? if not, this seems like a MAB to me that we should fix ASAP :-)
Comment 11 Petr Mladek 2012-04-23 07:58:34 UTC
I guess if it is related to http://cgit.freedesktop.org/libreoffice/core/commit/?id=65f9e1bd3bffd38457ec01ccba3344a4dd1edd80

It reordered the list of filters to look better. It puts all filters starting "O" together, so he moves OOXML just after ODF file formats and before MS file formats. So, OOXML is listed before MS Office 2007.

I think that we want to put OOXML at the end of the list. It could probably solve this bug as well.

Note that it most likely affects also DOCX and PPTX.
Comment 12 Markus Mohrhard 2012-04-23 08:06:06 UTC
(In reply to comment #10)
> > IMHO we should default to the excel export and only export perfectly
> > standard conform files if the user requests them.
> 
> Agreed, usability is king; is there any real/known advantage to using the 2010
> format that is incompatible with 2007 ? if not, this seems like a MAB to me
> that we should fix ASAP :-)

I don't think that this is a question of excel 2007 vs 2010 but more a question about what excel implements and what the standard defines. I only found one line difference in a namespace url. It seems that they can deal with this in 2010 but that 2007 did not implement the standard conform import.
Comment 13 Not Assigned 2012-04-24 03:13:34 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

default to Office 2007/2010 filter for ooxml export, fdo#48941
Comment 14 Not Assigned 2012-04-24 04:38:36 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6441b280c34c55301df169577de24f25ed0280b4&g=libreoffice-3-5

default to Office 2007/2010 filter for ooxml export, fdo#48941


It will be available in LibreOffice 3.5.4.
Comment 15 Not Assigned 2012-04-24 05:18:07 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-3-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=60e4db7aa959133fdae5e9536c8c6e0ae9ab447b&g=libreoffice-3-5-3

default to Office 2007/2010 filter for ooxml export, fdo#48941


It will be available already in LibreOffice 3.5.3.