public interface ConditionalFormattingRule extends DifferentialStyleProvider
Modifier and Type | Method and Description |
---|---|
BorderFormatting |
createBorderFormatting()
Create a new border formatting structure if it does not exist,
otherwise just return existing object.
|
FontFormatting |
createFontFormatting()
Create a new font formatting structure if it does not exist,
otherwise just return existing object.
|
PatternFormatting |
createPatternFormatting()
Create a new pattern formatting structure if it does not exist,
otherwise just return existing object.
|
BorderFormatting |
getBorderFormatting() |
ColorScaleFormatting |
getColorScaleFormatting() |
byte |
getComparisonOperation()
The comparison function used when the type of conditional formatting is set to
ConditionType.CELL_VALUE_IS |
ConditionFilterType |
getConditionFilterType()
This is null if
|
ConditionType |
getConditionType()
Type of conditional formatting rule.
|
DataBarFormatting |
getDataBarFormatting() |
ConditionFilterData |
getFilterConfiguration()
This is null if
|
FontFormatting |
getFontFormatting() |
java.lang.String |
getFormula1()
The formula used to evaluate the first operand for the conditional formatting rule.
|
java.lang.String |
getFormula2()
The formula used to evaluate the second operand of the comparison when
comparison type is
ConditionType.CELL_VALUE_IS and operator
is either ComparisonOperator.BETWEEN or ComparisonOperator.NOT_BETWEEN |
IconMultiStateFormatting |
getMultiStateFormatting() |
ExcelNumberFormat |
getNumberFormat() |
PatternFormatting |
getPatternFormatting() |
int |
getPriority()
The priority of the rule, if defined, otherwise 0.
|
boolean |
getStopIfTrue()
Always true for HSSF rules, optional flag for XSSF rules.
|
java.lang.String |
getText()
XSSF rules store textual condition values as an attribute and also as a formula that needs shifting.
|
getStripeSize
BorderFormatting createBorderFormatting()
null
.BorderFormatting getBorderFormatting()
getBorderFormatting
in interface DifferentialStyleProvider
null
otherwiseFontFormatting createFontFormatting()
null
.FontFormatting getFontFormatting()
getFontFormatting
in interface DifferentialStyleProvider
null
otherwisePatternFormatting createPatternFormatting()
null
.PatternFormatting getPatternFormatting()
getPatternFormatting
in interface DifferentialStyleProvider
null
otherwiseDataBarFormatting getDataBarFormatting()
null
otherwiseIconMultiStateFormatting getMultiStateFormatting()
null
otherwiseColorScaleFormatting getColorScaleFormatting()
null
otherwiseExcelNumberFormat getNumberFormat()
getNumberFormat
in interface DifferentialStyleProvider
ConditionType getConditionType()
ConditionFilterType getConditionFilterType()
getConditionType()
!= ConditionType.FILTER
This is always ConditionFilterType.FILTER
for HSSF rules of type ConditionType.FILTER
.
For XSSF filter rules, this will indicate the specific type of filter.
ConditionFilterData getFilterConfiguration()
getConditionFilterType()
== null
This means it is always null for HSSF, which does not define the extended condition types.
This object contains the additional configuration information for XSSF filter conditions.
byte getComparisonOperation()
ConditionType.CELL_VALUE_IS
MUST be a constant from ComparisonOperator
java.lang.String getFormula1()
If the condition type is ConditionType.CELL_VALUE_IS
,
this field is the first operand of the comparison.
If type is ConditionType.FORMULA
, this formula is used
to determine if the conditional formatting is applied.
If comparison type is ConditionType.FORMULA
the formula MUST be a Boolean function
java.lang.String getFormula2()
ConditionType.CELL_VALUE_IS
and operator
is either ComparisonOperator.BETWEEN
or ComparisonOperator.NOT_BETWEEN
java.lang.String getText()
int getPriority()
If priority is 0, just use definition order, as that's how older HSSF rules are evaluated.
For XSSF, this should always be set. For HSSF, only newer style rules have this set, older ones will return 0.
If a rule is created but not yet added to a sheet, this value may not be valid.
boolean getStopIfTrue()
Copyright 2022 The Apache Software Foundation or its licensors, as applicable.