How to know if conditional formatting for the cell is available

Hi,

Cell.getStyle() returns the style object and cell.getDisplayStyle() returns the conditional style. but How do i know whether the cell has conditional style or not? in other words I want to display conditional formatting style if available otherwise regular style of the cell. How do I check whether display style is available or not?

Regards,
Azhar

Hi,


I think you may try to use Cell.getConditionalStyle() method to check if a cell is conditionally formatted or not. e.g if cell.getConditionalStyle != null that means a cell is conditionally formatted, so you get its style etc.

Thank you.