@makarovalv,
Thanks for the sample code and template file.
After an initial test, I am able to reproduce the issue as you mentioned by using the following sample code with your template file. I found an issue with conditional formatting in Style.getDisplayStyle method. I noticed it gives same values whether the condition is true or false.
e.g
Sample code:
Workbook workbook = new Workbook("f:\\files\\in.xlsx");
Cell cell = workbook.getWorksheets().get(0).getCells().get("K13");
Style style = cell.getDisplayStyle();
Color color = style.getForegroundColor();
byte red = color.getR();
byte green = color.getG();
byte blue = color.getB();
System.out.println("Condition False: " + red + "," + green + "," + blue);
cell.putValue(5);
style = cell.getDisplayStyle();
color = style.getForegroundColor();
red = color.getR();
green = color.getG();
blue = color.getB();
System.out.println("Condition True: " + red + "," + green + "," + blue);
Output:
Condition False: 112,-83,71
Condition True: 112,-83,71 //Even the green value is not right.
I have logged a ticket with an id “CELLSJAVA-42932” for your issue. We will look into it soon.
Once we have an update on it, we will let you know.