Excel.DynamicFilterCriteria enum
Remarks
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" |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins