ExcelScript.FilterOn enum
注解
示例
/**
* This script applies a filter to a table so that
* only rows with values in column 1 that start with "L" are shown.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the autoFilter of the first table in the current worksheet.
const table = workbook.getActiveWorksheet().getTables()[0];
const autoFilter = table.getAutoFilter();
// Filter to only include values that start with "L".
const filterCriteria: ExcelScript.FilterCriteria = {
filterOn: ExcelScript.FilterOn.custom,
criterion1: "L*"
};
// Apply the filter to column 1 (zero-based).
autoFilter.apply(table.getRange(), 1, filterCriteria);
}
字段
bottomItems | |
bottomPercent | |
cellColor | |
custom | |
dynamic | |
fontColor | |
icon | |
topItems | |
topPercent | |
values |
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈