Bug 142154 - FILEOPEN: XLS cell background colors sometimes incorrect
Summary: FILEOPEN: XLS cell background colors sometimes incorrect
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.0.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xls
Depends on:
Blocks: XLS
  Show dependency treegraph
 
Reported: 2021-05-07 14:20 UTC by Callum McGing
Modified: 2023-03-19 10:54 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
affected .xls document (37.50 KB, application/vnd.ms-excel)
2021-05-07 14:21 UTC, Callum McGing
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Callum McGing 2021-05-07 14:20:22 UTC
Description:
Some cell background colours are incorrect when opening an Excel 97-2003 .xls file. See attachment for affected file (sensitive text redacted).

Steps to Reproduce:
1.Open attached .xls file
2.Observe cell background color for Cell A5

Actual Results:
Cell background is #00FFFF

Expected Results:
Color background should be #00FF99, as in Microsoft Excel


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Other cells in the document have correct background colors, only the left-hand two columns are incorrect.
Comment 1 Callum McGing 2021-05-07 14:21:03 UTC
Created attachment 171748 [details]
affected .xls document
Comment 2 Vadym 2021-05-12 12:02:16 UTC
Thank you for reporting the bug. I can confirm that the bug is present in 7.2.0.0.alpha0+
Comment 3 Callum McGing 2022-01-22 09:07:23 UTC
After some sleuthing, I found that this is because the affected .xls file stores the background colour for the cell in an XFExt BIFF record. This is defined in MS-XML 2.4.355 (https://docs.microsoft.com/en-us/openspecs/office_file_formats/ms-xls/8a198485-3609-4bcb-87e7-41894d48b76a). LibreOffice does not parse this, and therefore attempts to load the color from the default palette - giving #00FFFF instead of #00FF99 stored in the XFExt record.