Created attachment 122861 [details] test xlsx file Steps: 1. Open the attached xlsx file with Calc. 2. Save as another xlsx file. --> Cell background color lost. No bug when save as .ods or .xls. Version: 5.0.5.2 Build ID: 55b006a02d247b5f7215fc6ea0fde844b30035b3 Locale: zh-CN (zh_CN) Version: 5.1.1.1 (x64) Build ID: c43cb650e9c145b181321ea547d38296db70f36e CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; Locale: zh-CN (zh_CN)
Actually it seems that all cell formatting is lost: percentage numebr format, background, decimal places etc. Using the following bibisect repo: https://gerrit.libreoffice.org/#/admin/projects/bibisect-win32-5.1 I can reproduce in the "oldest" build: Version: 5.0.0.0.alpha1+ Build ID: ab465b90f6c6da5595393a0ba73f33a1e71a2b65
When open the resaved xlsx file with MSO, it says the style.xml contains invalid characters at line 2 column 316266. Then I open the style.xml with text editor and found it does contains invalid characters: <cellStyle name="<GARBAGE CHAR>" xfId="452" builtinId="53" customBuiltin="true"/>
(In reply to Kevin Suo from comment #2) MORE INFO: When open my test xlsx file in Calc, there is a style with garbage characters in its name. Delete this style and then resave, the bug is gone. So the issue is related to the handling of this style name at the time when resave as xlsx file. Remember, bug does not exist when save as other formats.
Hi Kevin, seems the issue is related with a strange style '?痃%S&F??o', deleting it the save it's fine for me, and a lot of other styles disappear. Maybe there is some kind of corruption in the file.
(In reply to m.a.riosv from comment #4) Yes, I already noted this style issue, but in my opinion this is still a bug of the XLS filter, as the formatting loss does not happen when resave as other formats. From the style.xml we can find that this strange style althrough defined, it was not used in the cells which lose their formatting when resave as xls format.
I have not Excel to verify, but even Aoo has troubles with styles opening the file. Using zamzar to convert the file from xlsx to ods, the same strange styles are there
I can confirm with Version: 5.2.0.0.alpha0+ Build ID: ef02de2698d90fd874bddf3146165cbe85487bc5 CPU Threads: 1; OS Version: Windows 6.1; UI Render: default; TinderBox: Win-x86@39, Branch:master, Time: 2016-02-19_23:40:50 and 4.2.8.2 When open the resaved xlsx file with MSO, it says the style.xml contains invalid characters at line 2 column 316266. - I can confirm with excel 2010. I can open original file in excel without problem.
Bug exists in the old LibreOffice 3.3.0 OOO330m19 (Build:6) tag libreoffice-3.3.0.4 linux. Set platform to ALL, version to 3.3.0 release.
Markus Mohrhard committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=fa881095bc62c3646406c82a98d8503377288a54 tdf#98074, using the same builtinId maps the styles to the same one It will be available in 6.2.0. 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.
Markus Mohrhard committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f67c6912e8612c5850a5728c2222971b4ec130b9&h=libreoffice-6-1 tdf#98074, using the same builtinId maps the styles to the same one It will be available in 6.1.1. 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.
*** Bug 93045 has been marked as a duplicate of this bug. ***