modern-xlsx API Reference - v1.3.0
    Preparing search index...

    Interface ConditionalFormattingRuleData

    A <cfRule> of a conditional-formatting block.

    interface ConditionalFormattingRuleData {
        aboveAverage?: boolean | null;
        additionalFormulas?: string[];
        bottom?: boolean | null;
        colorScale?: ColorScaleData | null;
        dataBar?: DataBarData | null;
        dxfId: number | null;
        equalAverage?: boolean | null;
        formula: string | null;
        iconSet?: IconSetData | null;
        operator: string | null;
        percent?: boolean | null;
        priority: number;
        rank?: number | null;
        ruleType: string;
        stdDev?: number | null;
        stopIfTrue?: boolean | null;
        text?: string | null;
        timePeriod?: string | null;
    }
    Index
    aboveAverage?: boolean | null

    aboveAverage of an 'aboveAverage' rule: false highlights cells below the average. Absent means true.

    additionalFormulas?: string[]

    The second and third <formula> children (a cellIs 'between' or 'notBetween' rule's upper bound is the second), written after formula in order. A <cfRule> holds at most three formulas: a rule with more fails the write with INVALID_WORKBOOK and is reported by validate(). An empty <formula/> reads as '' in its position. Absent when the rule has one formula or none.

    bottom?: boolean | null

    bottom of a 'top10' rule: the bottom rank values, not the top. Absent means false.

    colorScale?: ColorScaleData | null
    dataBar?: DataBarData | null
    dxfId: number | null

    Zero-based index into StylesData.dxfs of the format the rule applies.

    equalAverage?: boolean | null

    equalAverage of an 'aboveAverage' rule: values equal to the average also match. Absent means false.

    formula: string | null

    The first <formula> child.

    iconSet?: IconSetData | null
    operator: string | null
    percent?: boolean | null

    percent of a 'top10' rule: rank is a percentage, not a count. Absent means false.

    priority: number
    rank?: number | null

    rank of a 'top10' rule: how many values (or what percentage, with percent) match.

    ruleType: string

    The type attribute.

    stdDev?: number | null

    stdDev of an 'aboveAverage' rule: how many standard deviations from the average.

    stopIfTrue?: boolean | null

    stopIfTrue: no rule of lower priority applies once this one is true. Absent means false.

    text?: string | null

    text of a 'containsText', 'notContainsText', 'beginsWith' or 'endsWith' rule.

    timePeriod?: string | null

    timePeriod of a 'timePeriod' rule, such as 'lastWeek' or 'today'.