Interface ConditionalFormattingRule

    • Method Detail

      • createBorderFormatting

        BorderFormatting createBorderFormatting()
        Create a new border formatting structure if it does not exist, otherwise just return existing object.
        Returns:
        - border formatting object, never returns null.
      • createFontFormatting

        FontFormatting createFontFormatting()
        Create a new font formatting structure if it does not exist, otherwise just return existing object.
        Returns:
        - font formatting object, never returns null.
      • createPatternFormatting

        PatternFormatting createPatternFormatting()
        Create a new pattern formatting structure if it does not exist, otherwise just return existing object.
        Returns:
        - pattern formatting object, never returns null.
      • getDataBarFormatting

        DataBarFormatting getDataBarFormatting()
        Returns:
        - databar / data-bar formatting object if defined, null otherwise
      • getMultiStateFormatting

        IconMultiStateFormatting getMultiStateFormatting()
        Returns:
        - icon / multi-state formatting object if defined, null otherwise
      • getColorScaleFormatting

        ColorScaleFormatting getColorScaleFormatting()
        Returns:
        color scale / color grate formatting object if defined, null otherwise
      • getConditionType

        ConditionType getConditionType()
        Type of conditional formatting rule.
        Returns:
        the type of condition
      • getFilterConfiguration

        ConditionFilterData getFilterConfiguration()
        This is null if

        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.

        Returns:
        the Filter Configuration Data, or null if there isn't any
      • getComparisonOperation

        byte getComparisonOperation()
        The comparison function used when the type of conditional formatting is set to ConditionType.CELL_VALUE_IS

        MUST be a constant from ComparisonOperator

        Returns:
        the conditional format operator
      • getFormula1

        java.lang.String getFormula1()
        The formula used to evaluate the first operand for the conditional formatting rule.

        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

        Returns:
        the first formula
      • getText

        java.lang.String getText()
        XSSF rules store textual condition values as an attribute and also as a formula that needs shifting. Using the attribute is simpler/faster. HSSF rules don't have this and return null. We can fall back on the formula for those (AFAIK).
        Returns:
        condition text if it exists, or null
      • getPriority

        int getPriority()
        The priority of the rule, if defined, otherwise 0.

        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.

        Returns:
        rule priority
      • getStopIfTrue

        boolean getStopIfTrue()
        Always true for HSSF rules, optional flag for XSSF rules. See Excel help for more.
        Returns:
        true if conditional formatting rule processing stops when this one is true, false if not
        See Also:
        Microsoft Excel help