Bug 99679 - cell formatting lost when saving in .xlsx
Summary: cell formatting lost when saving in .xlsx
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.2.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-04 16:12 UTC by roberto
Modified: 2017-04-25 16:12 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
little test sheet (14.47 KB, application/zip)
2016-05-05 21:55 UTC, roberto
Details
test file (17.12 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-05-06 17:13 UTC, roberto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description roberto 2016-05-04 16:12:53 UTC
User-Agent:       Mozilla/5.0 (Windows NT 10.0; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
Build Identifier: LibreOffice 5.1.2.2

When I save a sheet in xlsx format it doesn't retain some of the cell formatting. I.e. cells that are saved with a numeric value with two decimal point revert to no decimals when I reopen the file.

Reproducible: Always

Steps to Reproduce:
1. save file
2. reopen file
3. change formatting
4. save file again
5. etc. etc.
Actual Results:  
Results are always the same: formatting is lost

Expected Results:  
I would expect that simple number formatting would be retained

[Information automatically included from LibreOffice]
Locale: en-US
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: yes


Reset User Profile?No
Comment 1 raal 2016-05-05 07:42:46 UTC Comment hidden (obsolete)
Comment 2 roberto 2016-05-05 21:55:49 UTC
Created attachment 124872 [details]
little test sheet

I found the same problem when saving as .xls
Comment 3 roberto 2016-05-05 22:03:27 UTC
I attached a tiny test sheet. Should mention that the same problem occurs when trying to save in .xls, so formatting gets lost both in .xls and .xlsx
Comment 4 Joel Madero 2016-05-06 14:55:59 UTC
Hi Roberto

We need the original ODS first - then we'll save it on our side to see what formatting is lost. It doesn't help to just show us a post-damaged file.

Moving back to NEEDINFO. Thanks
Comment 5 roberto 2016-05-06 17:13:35 UTC
Created attachment 124887 [details]
test file

The reason why I only included the .xlsx file is because that is the file that is giving the problem. 
Column A is date format yyyy-mm-22 and column B is number format with two decimals. I can repeatedly set these formats but every time I open the file the number format has changed to "no decimals". Actually sometimes the date format also changes, but I cannot consistently repeat that. Although the file started out originally as an .ods it has for quite a while been just an .xlsx, the reason being that is located in my Dropbox and in .xlsx format it can more easily be read on other devices such Chromebook or my phone.
Comment 6 roberto 2016-05-06 17:15:32 UTC
I don't know, I just wrote a comment in the previous screen. Here it is again:

The reason why I only included the .xlsx file is because that is the file that is giving the problem. 
Column A is date format yyyy-mm-22 and column B is number format with two decimals. I can repeatedly set these formats but every time I open the file the number format has changed to "no decimals". Actually sometimes the date format also changes, but I cannot consistently repeat that. Although the file started out originally as an .ods it has for quite a while been just an .xlsx, the reason being that is located in my Dropbox and in .xlsx format it can more easily be read on other devices such Chromebook or my phone.
Comment 7 raal 2016-05-06 20:03:16 UTC
No repro with 5.1.2,win7. Format 0,00  stay the same after save and reopen.
Comment 8 Buovjaga 2016-05-07 12:53:51 UTC
No repro.

Maybe try https://wiki.documentfoundation.org/UserProfile#Resolving_corruption_in_the_user_profile

64-bit, KDE Plasma 5
Build ID: 5.1.2.2 Arch Linux build-1
CPU Threads: 8; OS Version: Linux 4.5; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Comment 9 raal 2016-05-11 08:08:26 UTC
Roberto,
please try to reset profile as mentioned in comment 8 and let us know.
Comment 10 roberto 2016-05-11 15:01:51 UTC
Thanks for the suggestion to reset profile. I tried it, and it makes no difference whatsoever.
Comment 11 Carlos 2017-04-03 17:19:54 UTC
Thank you for reporting the bug. I can not reproduce the bug in
Version: 5.3.1.2 (x64)
Build ID: e80a0e0fd1875e1696614d24c32df0f95f03deb2
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
Locale: en-US (en_US); Calc: group
Comment 12 tommy27 2017-04-25 12:25:14 UTC
@roberto
please retest with latest LibO 5.3.2.2 and tell if issue persists.

I set status to NEEDINFO

revert it to UNCONFIRMED if bug is still there
or change it to RESOLVED WORKSFORME if bug is gone
Comment 13 roberto 2017-04-25 16:05:34 UTC
Sorry folks, I haven't paid much attention to this for a while. I just tried with version 5.2.3.3 and the bug appears to be gone.
Thank you all.