Download it now!
Bug 76785 - User-defined colors in Excel not loaded properly from xls
Summary: User-defined colors in Excel not loaded properly from xls
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.3.2 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks: Color-Palettes
  Show dependency treegraph
 
Reported: 2014-03-29 20:45 UTC by M Welinder
Modified: 2019-03-18 11:01 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
color17.xls sample file (5.50 KB, application/vnd.ms-excel)
2014-03-29 20:45 UTC, M Welinder
Details
Cell format in Calc (48.05 KB, image/png)
2019-03-18 11:00 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description M Welinder 2014-03-29 20:45:56 UTC
Created attachment 96603 [details]
color17.xls sample file

The upcoming xls file has a cell with format [Color17]"marker"General.
When saved to ods this becomes...

<number:number-style style:name="N132">
  <style:text-properties fo:color="#333333"/>
  <number:text>marker</number:text>
  <number:number number:min-integer-digits="1"/>
  <number:text/>
</number:number-style>

That's the wrong colour.  It should be #9999FF.  The other numbered colours
are wrong too.  When Gnumeric (git) reads the above ods sniplet, it generates
[Color56]"marker"General because #333333 is colour 56 in the Excel palette.

References:
http://dmcritchie.mvps.org/excel/colors.htm
http://christian.bloggingon.net/archive/2007/05/23/hintergrundfarben-fuer-excel-in-aspose.aspx

Note, that the correct 56-colour palette has duplicates.  That's stupid,
but it is MS stupidity.
Comment 1 Julien Nabet 2014-03-30 14:44:11 UTC
On pc Debian x86-64 with master sources updated today, I can reproduce the problem.
Not official but I found this about Excel colors:
http://www.himmera.com/Excel_Tutorial/Excel_color_code_for_VBA_Macros.html
Comment 2 QA Administrators 2015-12-20 16:14:09 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2017-01-03 19:48:49 UTC Comment hidden (obsolete)
Comment 4 mwelinder 2017-01-04 14:45:19 UTC
Still there in 5.2.3.3
Comment 5 QA Administrators 2018-03-10 03:45:16 UTC Comment hidden (obsolete)
Comment 6 mwelinder 2018-03-10 18:06:12 UTC
Sisyphus
Comment 7 Heiko Tietze 2018-03-17 17:01:43 UTC Comment hidden (no-value)
Comment 8 QA Administrators 2019-03-18 03:45:43 UTC Comment hidden (obsolete)
Comment 9 Heiko Tietze 2019-03-18 11:00:44 UTC
Created attachment 150043 [details]
Cell format in Calc

The cell content should be "123" in a defined color (it's AFAICS not stored in the xml file) with the formatting taken from somewhere else. Seems to be a WF to me.