https://bz.apache.org/bugzilla/show_bug.cgi?id=60845
--- Comment #7 from [email protected] --- Thanks for all your replies! I finally found out where the problem is: 1) Excel shows conditional formatting if, and only if, the cell has fillId=0 (the default NONE one) OR if the fillStylePattern != NONE. Thats a bug in Excel, not in POI. 2) The problem is, that Excel is de facto "Standard". POI calls like this to set the new Style: setCellStyleProperties >> setFormatProperties >> setFillPattern Here is what setFillPattern looks like: Java Code: public void setFillPattern(FillPatternType pattern) { CTFill ct = getCTFill(); CTPatternFill ctptrn = ct.isSetPatternFill() ? ct.getPatternFill() : ct.addNewPatternFill(); if (pattern == FillPatternType.NO_FILL && ctptrn.isSetPatternType()) { ctptrn.unsetPatternType(); } else { ctptrn.setPatternType(STPatternType.Enum.forInt(pattern.getCode() + 1)); } addFill(ct); } It (POI) does simply not check if the FillStyle does already exist, it always adds a new one. And in general, this is then not fullfilling condtions in 1) -- 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]
