https://issues.apache.org/bugzilla/show_bug.cgi?id=49688
Summary: conditional formatting based on formula not
(re-)calculated properly
Product: POI
Version: 3.7-dev
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=25828)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=25828)
java code for creating a test file, reproducing the unexpected behaviour
Using both, poi-bin-3.7-beta1-20100620 or poi-bin-3.6-20091214, when creating a
formula based conditional formatting referencing another cell, the formatting
is not (re-)calculated properly.
The attached file contains a test case where a cell (B1) should be formatted
with a yellow background if another cell (A1) is blank, what is the initial
state of the created sheet. When opening the file, the format is correct (A1 is
not blank, thus B1 has a yellow background). If I clear cell A1, cell B1 will
not be formatted with a white background (as I just notice, it seems that just
the small part hidden by the cursor will be formatted correctly).
Coming from http://article.gmane.org/gmane.comp.jakarta.poi.user/13767/, I
tried to find a way to set CFHeaderRecord.setNeedRecalculation(boolean b) to
true (which, as long as I can see, is never used in POI's sources except in a
test case), without success.
Patching the constructor of CFHeaderRecord to initially calling
setNeedRecalculation(true) or changing HSSFConditionalFormatting's
getCFRecordsAggregate() to public, so i was able to access it, resulted in a
excel file with the correct behaviour.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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]