https://issues.apache.org/bugzilla/show_bug.cgi?id=49688

--- Comment #1 from [email protected] 2011-09-16 14:53:29 UTC ---
I've been encountering a problem very similar to that described in here. When
setting conditional formatting in a sheet by means of POI, if I choose to set a
rule with a formula that contain a reference to a cell that is not present in
the range defined by "CellRangeAddress" object, the cells included in this
region (the CellRangeAddress object) will not update to the formatting
associated to the rule.
Better to post some code:
-------------------------------------------------------------------
SheetConditionalFormatting sheetCF = heet.getSheetConditionalFormatting();

        ConditionalFormattingRule rule1 = 
sheetCF.createConditionalFormattingRule("$A$15>75");

PatternFormatting fill1 = rule1.createPatternFormatting();
fill1.setFillBackgroundColor(IndexedColors.BLUE.index);
fill1.setFillPattern(PatternFormatting.SOLID_FOREGROUND);

CellRangeAddress[] regions = {CellRangeAddress.valueOf("A18:A20")};

sheetCF.addConditionalFormatting(regions, rule1);
-------------------------------------------------------------------

If I change the formula in "$A$18>75", that is if the cell involved in the
formula is included in the region defined by CellRangeAddress object, opening
the file with excel the cells are formatted correctly.

-- 
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]

Reply via email to