Bug 70205 - FILESAVE: (Re-)Export as .xlsx messes up colors for Excel 2008
Summary: FILESAVE: (Re-)Export as .xlsx messes up colors for Excel 2008
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.2.3 release
Hardware: Other macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-06 17:25 UTC by Marcel Waldvogel
Modified: 2015-06-08 14:27 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Shows reasonable cell/text colors in LibreOffice, horrible in Excel (2008) (14.96 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2013-10-06 17:25 UTC, Marcel Waldvogel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Waldvogel 2013-10-06 17:25:35 UTC
Created attachment 87203 [details]
Shows reasonable cell/text colors in LibreOffice, horrible in Excel (2008)

Problem description: 

Cell background colors saved to .xlsx files appear horribly changed in Excel.

Steps to reproduce:
1. Create a spreadsheet with background colors in Excel 2008 for Mac (I have not tested with other Excel versions)
2. Open this .xlsx file in LibreOffice
3. Change a number in the file
4. Save back as .xlsx

Current behavior:
The colors as shown in Excel after saving have very little resemblance to the original colors. Opening the .xlsx file in LibreOffice, however, still shows the original colors. So it seems that Excel (2008) and LibreOffice use different information to render the colors.

Expected behavior:
The colors should be the same in both documents.

Operating System: Mac OS X
Version: 4.1.2.3 rc
Comment 1 retired 2013-11-22 15:02:06 UTC
WORKSFORME.

Opened the test document in

* LO 4.1.3.2
* Version: 4.3.0.0.alpha0+
Build ID: 73342dbb82ba074d01962359dac50fb2aa36cbeb
TinderBox: MacOSX-x86@49-TDF, Branch:master, Time: 2013-11-22_07:09:14
* Excel 2011

Colors look identical. Excel complains about the document. I allow it to do the repair and once it shows all is identical to LO.

Please re-open is this persists. In that case please provide a screenshot clearly showing the issue.
Comment 2 Marcel Waldvogel 2014-03-08 16:09:48 UTC
Today I had to open a LibreeOffice (4.2.0.2 and 4.2.1.1)-created .xlsx in Excel for Mac 2008 again. The colors were all messed up: bright pink became dull gray, bright green turned into a dark, dirty green etc.

Looking at the unzipped .xlsx file, I noticed that all colors (color, fgColor and bgColor tags) written by LibreOffice into xl/styles.xml were defined by the rgb="AARRGGBB" (where AARRGGBB is the 32-bit color value in hex) attribute. However, Excel for Mac 2008 used indexed="i" (where i is the into the indexedColors' rgbColors; there "rgb="AARRGGBB" works interestingly).

Changing the rgb="AAARRGGBB" attributes on the color, fgColor, and bgColor tags manually to the appropriate indexed="i" values fixed the colors. (They did not match exactly, but the amount of differences might be explained by some color profile application.)


Could you please change LibreOffice to write font and fill colors indirectly, i.e., by reference into the indexed color tables (indexed="i" attribute) instead of explicitely specifying the RGB components (rgb="AARRGGBB").

This would increase compatibility with Excel for Mac 2008. Thanks!
Comment 3 ign_christian 2014-07-30 14:36:40 UTC
Set UNCONFIRMED: need confirmation from others
Comment 4 Alex Thurgood 2014-10-06 14:29:25 UTC
Attemting to open the xlsx file in Office 2011 for Mac raises a file corruption error linked to named ranges :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>Réparer le résultat vers BIB3 06337.xml</logFileName><summary>Des erreurs ont été détectées dans le fichier « Macintosh HD2:Users:alex:Downloads:BIB3.xlsx »</summary><removedRecords summary="Liste des enregistrements supprimés ci-dessous :"><removedRecord>Enregistrements supprimés: Plage nommée dans /xl/workbook.xml (Classeur)</removedRecord></removedRecords></recoveryLog>
Comment 5 Alex Thurgood 2014-10-06 14:32:28 UTC
If I allow Excel to repare the file, it seems to display OK (both sheets)
Comment 6 Alex Thurgood 2014-10-06 14:34:47 UTC
The cell background colours after self repair by Excel are the same as for LO
Comment 7 Alex Thurgood 2014-10-06 14:35:15 UTC
Tested on OSX 10.9.5
Comment 8 Alex Thurgood 2014-10-06 14:46:45 UTC
Filter problem with transitional ooxml created with Office 2008 for Mac, a no longer supported product (EOL April 9th, 2013).
Comment 9 Alex Thurgood 2014-10-06 14:49:23 UTC
Confirming that test file shows as corrupt when opening in Office 2011 for Mac, but colours fine - maybe title should be changed to reflect findings ?
Comment 10 Robinson Tryon (qubit) 2014-10-26 21:09:01 UTC
(In reply to Alex Thurgood from comment #9)
> Confirming that test file shows as corrupt when opening in Office 2011 for
> Mac, but colours fine - maybe title should be changed to reflect findings ?

Yep, updating the bug might be relevant here.

Hi Marcel,
Can you still reproduce this bug with modern versions of LibreOffice and MS-Office? I see the note that Office 2008 is now EOL.

If you can, please leave a short comment and change the bug status back to UNCONFIRMED.

Thanks!
--R
Comment 11 SeattleAnn 2014-10-26 22:11:39 UTC
On a x86-64 Mac, using LO v4.4.0.0.alpha1 and Excel for Mac 2011, I get the same results as foss in Comment 1.

Specifically, after repairing and opening the file in Excel and opening in LO, the colors appear identical.
Comment 12 QA Administrators 2015-05-06 14:15:15 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least
6 months. Please provide the requested information as soon as
possible and mark the bug as UNCONFIRMED. Due to regular bug
tracker maintenance, if the bug is still in NEEDINFO status with
no change in 30 days the QA team will close the bug as INVALID
due to lack of needed information.

For more information about our NEEDINFO policy please read the
wiki located here:
https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO

If you have already provided the requested information, please
mark the bug as UNCONFIRMED so that the QA team knows that the
bug is ready to be confirmed.
 
Thank you for helping us make LibreOffice even better for everyone!


Warm Regards,
QA Team
Comment 13 QA Administrators 2015-06-08 14:27:02 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INVALID due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

-- The LibreOffice QA Team 

This INVALID Message was generated on: 2015-05-06

Warm Regards,
QA Team