Excel.DynamicFilterCriteria enum

Remarks

[ API set: ExcelApi 1.2 ]

Examples

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/46-table/filter-data.yaml

await Excel.run(async (context) => {
    const sheet = context.workbook.worksheets.getItem("Sample");

    const expensesTable = sheet.tables.getItem("ExpensesTable");

    let filter = expensesTable.columns.getItem("Amount").filter;
    filter.apply({
        filterOn: Excel.FilterOn.dynamic,
        dynamicCriteria: Excel.DynamicFilterCriteria.belowAverage
    });

    filter = expensesTable.columns.getItem("Category").filter;
    filter.apply({
            filterOn: Excel.FilterOn.values,
            values: ["Restaurant", "Groceries"]
    });

    await context.sync();
   });

Fields

aboveAverage = "AboveAverage"
allDatesInPeriodApril = "AllDatesInPeriodApril"
allDatesInPeriodAugust = "AllDatesInPeriodAugust"
allDatesInPeriodDecember = "AllDatesInPeriodDecember"
allDatesInPeriodFebruray = "AllDatesInPeriodFebruray"
allDatesInPeriodJanuary = "AllDatesInPeriodJanuary"
allDatesInPeriodJuly = "AllDatesInPeriodJuly"
allDatesInPeriodJune = "AllDatesInPeriodJune"
allDatesInPeriodMarch = "AllDatesInPeriodMarch"
allDatesInPeriodMay = "AllDatesInPeriodMay"
allDatesInPeriodNovember = "AllDatesInPeriodNovember"
allDatesInPeriodOctober = "AllDatesInPeriodOctober"
allDatesInPeriodQuarter1 = "AllDatesInPeriodQuarter1"
allDatesInPeriodQuarter2 = "AllDatesInPeriodQuarter2"
allDatesInPeriodQuarter3 = "AllDatesInPeriodQuarter3"
allDatesInPeriodQuarter4 = "AllDatesInPeriodQuarter4"
allDatesInPeriodSeptember = "AllDatesInPeriodSeptember"
belowAverage = "BelowAverage"
lastMonth = "LastMonth"
lastQuarter = "LastQuarter"
lastWeek = "LastWeek"
lastYear = "LastYear"
nextMonth = "NextMonth"
nextQuarter = "NextQuarter"
nextWeek = "NextWeek"
nextYear = "NextYear"
thisMonth = "ThisMonth"
thisQuarter = "ThisQuarter"
thisWeek = "ThisWeek"
thisYear = "ThisYear"
today = "Today"
tomorrow = "Tomorrow"
unknown = "Unknown"
yearToDate = "YearToDate"
yesterday = "Yesterday"