Bug 65328 - FILESAVE: after particular XLSX saving document structure is lost and it could not be opened in MSO
Summary: FILESAVE: after particular XLSX saving document structure is lost and it coul...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.3.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-04 06:27 UTC by Timon
Modified: 2015-05-21 10:37 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example_32_1.xlsx - original file, Example_32_2.xlsx - resaved in LibO, error055480_01.xml - error log from MSO (95.17 KB, application/x-zip)
2013-06-04 06:27 UTC, Timon
Details
Broken export to xlsx (97.78 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-10-30 13:58 UTC, Mateusz
Details
Additional files for testing (108.08 KB, application/save-as)
2014-11-19 10:11 UTC, Uldis Kalniņš
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timon 2013-06-04 06:27:26 UTC
Created attachment 80264 [details]
Example_32_1.xlsx - original file, Example_32_2.xlsx - resaved in LibO, error055480_01.xml - error log from MSO

LibreOffice Version: 4.0.3.3 Build ID: 0eaa50a932c8f2199a615e1eb30f7ac74279539 on Russian Windows XP Professional SP3 (32bit)

If we try to open Example_32_1.xlsx file in LibreOffice and make any changes (for example, in cell D22 we change 0 -> 1), save file in existent format (Microsoft Excel 2007/2010 XML (.xlsx)) and close LibreOffice after that, then the next time we try to open that file (see Example_32_2.xlsx) we see that document structure has been completely lost (font and backround colors lost, bold text is lost, all columns have default width, ...) and the worst thing that file could not not be opened in MSOffice suite anymore (tested in 2003 and 2007). MSOffice says that "There are errors in file. List of removed components is below: Replaced component: part /xl/worksheets/sheet1.xml with XML error. Download failed. Row 2, Column 135408"
Comment 1 bfoman (inactive) 2013-06-28 11:13:12 UTC
Confirmed with:
LO 4.2.0.0.alfa0
Build ID: 2013-06-24 own debug build 
Windows 7 Professional SP1 64 bit

Document structure has been completely lost. 
Error when changed D22 from 0 to 1, saved as xlsx and opened in Excel 2010:
/xl/worksheets/sheet1.xml with XML error.
Illegal qualified name character. 
Row 2, Column 96787.
Comment 2 Mateusz 2013-10-30 13:58:43 UTC
Created attachment 88362 [details]
Broken export to xlsx

Hey

I still can confirm existing bug. I attached "broken export to xlsx". If you resave document to XLSX, MS Excel won't open document. Tested under 4.1 and 4.2 DEV
Comment 3 Timon 2014-08-01 05:22:49 UTC
LibreOffice Version: 4.3.0.4 Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec0 on Russian Windows XP Professional SP3 (32bit)

Much better, but not perfect.

Document structure is lost, but visually file became more similar to the orginal after reopening (font and backround colors lost in some places, but some are as it was in original (for example, D259:D260 is as in original file); bold text is lost. Problem places - A30:AMJ30 or A47:AMJ47 or D41:D46 and so on. Problem with columns default width is fixed (they are similar to original file).
File COULD be opened in MSOffice suite now (tested in 2007), but continues to report an error. First we see the following message - In Example_32_2.xlsx found content that could not be read. Try to restore content of the file? If you trust the source of this file, click "Yes." After that MSOffice says that "There are errors in file... But after that we can see file content. It's not perfect, but we can see it!
Comment 4 Uldis Kalniņš 2014-11-19 10:09:44 UTC
Bug still present in LO 4.3.4.1 . Saved *.xlsx fails to open in Microsoft office 2007 and 2010.

Added more files for testing - original *.ods, resulting *.xlsx and *.xls - just in case.
Comment 5 Uldis Kalniņš 2014-11-19 10:11:01 UTC
Created attachment 109719 [details]
Additional files for testing

More files for testing - original *.ods, resulting *.xlsx and *.xls - just in case.
Comment 6 Yogesh Bharate 2015-05-12 13:08:06 UTC
[ Timan ] :
Can you please create separate issues for separate bugs ? like text property i.e bold or hilighting part etc. which is better to maintain.
Comment 7 Yogesh Bharate 2015-05-13 06:51:39 UTC
1.This is not reproducible on latest ubuntu build.

Build ID :
Version: 5.0.0.0.alpha1+
Build ID: 0c129aa3df35a056ec739579002b2fc958fb3a48
Locale: en-IN (en_IN)

2. Now, after save as to .xlsx the structure is not lost, opened the roundtrip file in MSO2010, its how recovery option, after recovering which doesnot affect the structure of documents.

3. On LibreOffice 4.0.3.3, it create below invalid xml during export:
<formula>AND($B4<>"",A4="",A$1<>"") which cause the problem.

but now, it create the valid xml during export which is as below:
<formula>AND($B4&lt;&gt;&quot;&quot;,A4=&quot;&quot;,A$1&lt;&gt;&quot;&quot;)</formula>

4. Attached file content another issues like text property(i.e bold text, text color etc ) in the cell is not preserved after roundtrip, we create separate issues in bugzilla for that.
Comment 8 Timon 2015-05-13 10:00:47 UTC
LibreOffice Version: 4.4.3.2 Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16
Locale: ru_RU on Russian Windows XP Professional SP3 (32bit)

I don't see much changes vs LibreOffice Version: 4.3.0.4 Build ID: 62ad5818884a2fc2e5780dd45466868d41009ec0

After saving, if we try to open document in LibreOffice, than the structure is not lost (except text properties).
But if we try to open document in MSOffice 2007, then structure of document is completely lost. The only good thing, that we can see file content.

I don't agree that [ Yogesh Bharate ] changed bug status to RESOLVED WORKSFORME.
It doesn't works for me in current more or less stable version!

Made separate bug about lost text properties https://bugs.documentfoundation.org/show_bug.cgi?id=91255
Comment 9 Yogesh Bharate 2015-05-21 10:37:50 UTC
<U>Timon</U>

- Firstly, thanks for making separate issues in bugzilla for text properties not preserved after export.
-If you analysed the files attached to issue (files in Examples.zip), this shows actual what is mean by lost structure ??
- Lost structure means all data in XLSX is lost. If you checked the attached files name as Example_32_2.xlsx which is roundtriped file which clear everything.
- If you trying to open this file in MS Office, it shows some recovery options, its opened, but whole file contents in roundtripped file has lost.i.e empty file.
- This scenario is not happened on latest build roundtripped file, When you opens file in MS Office, it shows recovery options and opened the file without any file content loss in XLSX.
- Therefore, this issue is RESOLVED and WORKEFORME.