https://bz.apache.org/bugzilla/show_bug.cgi?id=60462
Bug ID: 60462
Summary: indexedColors not extracted when stored in styles.xml
Product: POI
Version: 3.15-FINAL
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 34513
--> https://bz.apache.org/bugzilla/attachment.cgi?id=34513&action=edit
example workbook
The attached spreadsheet originally created with an earlier Excel, but recently
modified, has a fill foreground set for A1 on 'mixed' sheet.
from sheet1.xml:
<c r="A1" s="2" t="s">
from styles.xml
Here is xf #2:
<xf numFmtId="0" fontId="4" fillId="43" borderId="0" xfId="0"
applyFont="1" applyFill="1" applyProtection="1">
<protection hidden="1"/>
</xf>
Here is fill #43:
<patternFill patternType="solid">
<fgColor indexed="8"/>
<bgColor indexed="64"/>
</patternFill>
and here are the first 8 indexedColors:
<colors>
<indexedColors>
<rgbColor rgb="00000000"/>
<rgbColor rgb="00FFFFFF"/>
<rgbColor rgb="00FF0000"/>
<rgbColor rgb="0000FF00"/>
<rgbColor rgb="000000FF"/>
<rgbColor rgb="00FFFF00"/>
<rgbColor rgb="00FF00FF"/>
<rgbColor rgb="0000FFFF"/>
<rgbColor rgb="00FF00FF"/>
The correct color here is 00FF00FF (magenta), and that is what any version of
excel shows when reading this wb. However, using getFillForegroundColor() on
XSSFCellFill returns '00000000' because it simply looks it up in the
indexedColors enum. But that enum only describes the default indexedColors. If
indexedColors is stored in the wb, those should be used during extraction
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]