Bug 106734 - Incorrect colors imported from XLS with conditional formatting (XLSX is okay)
Summary: Incorrect colors imported from XLS with conditional formatting (XLSX is okay)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: interoperability
Keywords: filter:xls
: 137362 (view as bug list)
Depends on:
Blocks: XLS-Conditional-Formatting
  Show dependency treegraph
 
Reported: 2017-03-24 01:58 UTC by Aron Budea
Modified: 2024-03-11 05:29 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
XLS sample (27.50 KB, application/vnd.ms-excel)
2017-03-24 01:58 UTC, Aron Budea
Details
XLSX sample (8.37 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2017-03-24 01:59 UTC, Aron Budea
Details
Comparison of colors between Excel and Calc (XLS) (97.60 KB, image/png)
2017-03-24 02:02 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2017-03-24 01:58:16 UTC
Created attachment 132111 [details]
XLS sample

The attached XLS contains conditionally formatted cells with the predefined color schemes in Excel 2013. (Light Red Fill with Dark Red Text etc.)

A lot of those colors are imported incorrectly, especially Dark Red, which is imported as purple. The rest are only slightly different. The same colors look okay when imported from XLSX.

Color codes from Excel (text and background):
A2: 156 / 0 / 6		255 / 199 / 206
B2: 156 / 101 / 0	255 / 235 / 156
C2: 0 / 97 / 0		198 / 239 / 206
D2: Automatic		255 / 199 / 206
E2: 156 / 0 / 6		No fill
F2: Automatic		No fill		border 156 / 0 / 6

Color codes/names from Calc (text and background):
A2: #800080		Pink 10
B2: #993300		Yellow
C2: Green 5		Green 10
D2: Black		Pink 10
E2: #800080		No fill
F2: Black		No fill		border #800080

Reproduced with v5.3.1.2 & v3.3.0 / Windows 7.
Comment 1 Aron Budea 2017-03-24 01:59:14 UTC
Created attachment 132112 [details]
XLSX sample
Comment 2 Aron Budea 2017-03-24 02:02:23 UTC
Created attachment 132113 [details]
Comparison of colors between Excel and Calc (XLS)
Comment 3 Xisco Faulí 2017-03-24 10:12:38 UTC
Confirmed in

Version: 5.4.0.0.alpha0+
Build ID: 1670cc25bc2771e87f7956a4b0dd634abaa4128b
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 4 Markus Mohrhard 2017-04-09 23:44:18 UTC
Seems to be related to missing CFEx and similar elements and structs in the xls import and export filter.

I'm not sure if we want to implement these records. It looks like a huge mess and my documentation effort in oletoy shows that you most likely need some reverse engineering to implement them.
Comment 5 tom1williams 2017-08-14 16:16:59 UTC Comment hidden (no-value)
Comment 6 Aron Budea 2017-08-16 02:13:19 UTC Comment hidden (obsolete)
Comment 7 QA Administrators 2018-08-17 02:38:14 UTC Comment hidden (obsolete)
Comment 8 Aron Budea 2018-08-19 05:00:24 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2019-09-02 09:20:41 UTC Comment hidden (obsolete)
Comment 10 Aron Budea 2019-09-02 18:19:43 UTC
Still the same in LO 6.4.0.0.alpha0+ (a40fbd031de042b0181dc5570164ae8ce0abb0f1) / Ubuntu 19.04.
Comment 11 Aron Budea 2021-07-13 00:51:04 UTC
*** Bug 137362 has been marked as a duplicate of this bug. ***
Comment 12 Diana Vides 2023-07-05 18:46:27 UTC
This bug is still able to reproduce in Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 6; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: hr-HR (en_US); UI: en-US
Calc: threaded

Also is able to reproduce in Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 105f057f5b994b7d79a55ca719240839c2d45b54
CPU threads: 6; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: hr-HR (en_US); UI: en-US
Calc: CL threaded