Edit

Excel.ConditionalCellValueOperator enum

Represents the operator of the text conditional format type.

Remarks

API set: ExcelApi 1.6

Used by

Examples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/14-conditional-formatting/conditional-formatting-basic.yaml

await Excel.run(async (context) => {
    const sheet = context.workbook.worksheets.getItem("Sample");
    const range = sheet.getRange("B21:E23");
    const conditionalFormat = range.conditionalFormats
        .add(Excel.ConditionalFormatType.cellValue);
    conditionalFormat.cellValue.format.font.color = "red";
    conditionalFormat.cellValue.rule = { 
        formula1: "=0",
        operator: Excel.ConditionalCellValueOperator.lessThan
    };

    await context.sync();
});

Fields

between = "Between"
equalTo = "EqualTo"
greaterThan = "GreaterThan"
greaterThanOrEqual = "GreaterThanOrEqual"
invalid = "Invalid"
lessThan = "LessThan"
lessThanOrEqual = "LessThanOrEqual"
notBetween = "NotBetween"
notEqualTo = "NotEqualTo"