Hi. I found, that since version 8.9.2 conditional formating is broken (either we used it incorrectly)
There is test:
Part of sheet is under conditional formatting. Cell M18 is part of it
@Test
public void conditionalFormatting() throws Exception {
Workbook workbook = new Workbook(“D://in.xlsx”);
Worksheet worksheet = workbook.getWorksheets().get(0);
Cell cell = worksheet.getCells().get(“M18”);
CalculationOptions options = new CalculationOptions();
options.setIgnoreError(true);
cell.calculate(options);
ConditionalFormattingResult result = cell.getConditionalFormattingResult();
FormatConditionCollection[] conditions = cell.getFormatConditions();
for (FormatConditionCollection collection : conditions) {
for (int i = 0; i < collection.getCount(); i++) {
FormatCondition condition = collection.get(i);
System.out.print(condition.getText());
}
}
Style style = cell.getDisplayStyle();
Color color = style.getBackgroundColor();
System.out.println(color.getA() + " " + color.getR() + " " + color.getG() + " " + color.getB());
}
but this code returns 0 0 0 0 for background color of cell.
Best regards. Alexey