Bug 55418 - FILESAVE: re-exported xlsx cells with cell style results in corrupted cell styles
Summary: FILESAVE: re-exported xlsx cells with cell style results in corrupted cell st...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.6.2.1 rc
Hardware: Other All
: medium major
Assignee: Noel Power
URL:
Whiteboard: target:3.7.0 target:3.6.4
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-28 13:21 UTC by Noel Power
Modified: 2013-06-12 10:17 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
screenshot (97.63 KB, image/png)
2012-09-28 16:24 UTC, Noel Power
Details
screenshot (97.55 KB, image/png)
2012-09-28 16:25 UTC, Noel Power
Details
Short selling notification form (53.21 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2013-06-11 23:20 UTC, Jeff
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Noel Power 2012-09-28 13:21:44 UTC
after creating some cells with cell styles ( e.g. a number format with some alignment ), saving to xlsx format and reloading the document is read correctly both in calc and excel. However after modifying the xlsx document ( one that previously was saved by calc ) and resaving again sometimes the cellstyles can be corrupted, e.g. when opened in excel the formatting is different from what was originally saved. Worse still the document can show different content in Excel and Calc and even worse still again sometimes the document is marked as corrupt by Excel forcing a repair.
Comment 1 Noel Power 2012-09-28 16:19:00 UTC
you could start with the document attached to bug #55417 and copy the cell with '29' in it.

1) open a new document
2) paste the value ( and formatting etc. ) into a cell ( cntrl-v is enough )
3) save as xlsx
4) reload, ( assuming bug #55417 is fixed it should look the same, if not you will notice the text is no longer centre alligned )
5) paste numerous other cells with the same content
6) save again
7) reload - hopefully the formatting will be different, e.g. instead of 29 ( which is the month of a date ) you might get a comma format or just a plain number etc. ( ymmv it's pretty random )

if you open the document in excel even if it displays badly ( or correctly ) in calc then again what excel displays could be either a) looks like it should, b) some of the formats are wrong or c) complains about some unreadable content to do with styles.xml and asks to repair the document )

some screen shots to follow
Comment 2 Noel Power 2012-09-28 16:24:00 UTC
Created attachment 67832 [details]
screenshot

shows the document after the initial save to xlsx and reloaded, document has been modified with more instances of the cell content, it also has been saved ( but not yet reloaded )
Comment 3 Noel Power 2012-09-28 16:25:52 UTC
Created attachment 67833 [details]
screenshot

this shows the document from the previous screenshot after it has been reloaded, notice the format has been changed ( general number in this case )
Comment 4 Not Assigned 2012-09-28 18:09:05 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "master":

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

halt corrupted styles with multi-saved xlsx document fdo#55418



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 5 Not Assigned 2012-11-05 17:14:08 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3225eff997c0703a7b8e784a19770c8eca7263a7&g=libreoffice-3-6

halt corrupted styles with multi-saved xlsx document fdo#55418


It will be available in LibreOffice 3.6.4.

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 6 Noel Power 2013-02-05 12:46:36 UTC
fix committed
Comment 7 Jeff 2013-06-11 23:20:40 UTC
Created attachment 80710 [details]
Short selling notification form
Comment 8 Jeff 2013-06-11 23:22:26 UTC
This problem occurs in Version 4.0.3.3 (Build ID: 0eaa50a932c8f2199a615e1eb30f7ac74279539)

If you try to fill in the form, save it...and then reopen the document, the format isn't correct.

(In reply to comment #7)
> Created attachment 80710 [details]
> Short selling notification form
Comment 9 Noel Power 2013-06-12 10:17:11 UTC
(In reply to comment #8)
> This problem occurs in Version 4.0.3.3 (Build ID:
> 0eaa50a932c8f2199a615e1eb30f7ac74279539)
> 
> If you try to fill in the form, save it...and then reopen the document, the
> format isn't correct.
> 
please DONT be tempted to hijack 'random' bugs that seem to have something to do with your specific problem. Open a new bug and please read carefully  https://wiki.documentfoundation.org/BugReport#Submitting_a_bug