-
Notifications
You must be signed in to change notification settings - Fork 63
/
excel.filtercriteria.yml
177 lines (163 loc) · 7.65 KB
/
excel.filtercriteria.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
### YamlMime:TSType
name: Excel.FilterCriteria
uid: 'excel!Excel.FilterCriteria:interface'
package: excel!
fullName: Excel.FilterCriteria
summary: Represents the filtering criteria applied to a column.
remarks: '\[ [API set: ExcelApi 1.2](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
type: interface
properties:
- name: color
uid: 'excel!Excel.FilterCriteria#color:member'
package: excel!
fullName: color
summary: The HTML color string used to filter cells. Used with `cellColor` and `fontColor` filtering.
remarks: '\[ [API set: ExcelApi 1.2](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'color?: string;'
return:
type: string
- name: criterion1
uid: 'excel!Excel.FilterCriteria#criterion1:member'
package: excel!
fullName: criterion1
summary: >-
The first criterion used to filter data. Used as an operator in the case of `custom` filtering. For example "<!--
-->><!-- -->50" for numbers greater than 50, or "=*s" for values ending in "s".
Used as a number in the case of top/bottom items/percents (e.g., "5" for the top 5 items if `filterOn` is set to
`topItems`<!-- -->).
remarks: '\[ [API set: ExcelApi 1.2](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'criterion1?: string;'
return:
type: string
- name: criterion2
uid: 'excel!Excel.FilterCriteria#criterion2:member'
package: excel!
fullName: criterion2
summary: The second criterion used to filter data. Only used as an operator in the case of `custom` filtering.
remarks: '\[ [API set: ExcelApi 1.2](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'criterion2?: string;'
return:
type: string
- name: dynamicCriteria
uid: 'excel!Excel.FilterCriteria#dynamicCriteria:member'
package: excel!
fullName: dynamicCriteria
summary: >-
The dynamic criteria from the `Excel.DynamicFilterCriteria` set to apply on this column. Used with `dynamic`
filtering.
remarks: '\[ [API set: ExcelApi 1.2](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: >-
dynamicCriteria?: Excel.DynamicFilterCriteria | "Unknown" | "AboveAverage" | "AllDatesInPeriodApril" |
"AllDatesInPeriodAugust" | "AllDatesInPeriodDecember" | "AllDatesInPeriodFebruray" | "AllDatesInPeriodJanuary" |
"AllDatesInPeriodJuly" | "AllDatesInPeriodJune" | "AllDatesInPeriodMarch" | "AllDatesInPeriodMay" |
"AllDatesInPeriodNovember" | "AllDatesInPeriodOctober" | "AllDatesInPeriodQuarter1" | "AllDatesInPeriodQuarter2"
| "AllDatesInPeriodQuarter3" | "AllDatesInPeriodQuarter4" | "AllDatesInPeriodSeptember" | "BelowAverage" |
"LastMonth" | "LastQuarter" | "LastWeek" | "LastYear" | "NextMonth" | "NextQuarter" | "NextWeek" | "NextYear" |
"ThisMonth" | "ThisQuarter" | "ThisWeek" | "ThisYear" | "Today" | "Tomorrow" | "YearToDate" | "Yesterday";
return:
type: >-
<xref uid="excel!Excel.DynamicFilterCriteria:enum" /> | "Unknown" | "AboveAverage" | "AllDatesInPeriodApril" |
"AllDatesInPeriodAugust" | "AllDatesInPeriodDecember" | "AllDatesInPeriodFebruray" | "AllDatesInPeriodJanuary"
| "AllDatesInPeriodJuly" | "AllDatesInPeriodJune" | "AllDatesInPeriodMarch" | "AllDatesInPeriodMay" |
"AllDatesInPeriodNovember" | "AllDatesInPeriodOctober" | "AllDatesInPeriodQuarter1" |
"AllDatesInPeriodQuarter2" | "AllDatesInPeriodQuarter3" | "AllDatesInPeriodQuarter4" |
"AllDatesInPeriodSeptember" | "BelowAverage" | "LastMonth" | "LastQuarter" | "LastWeek" | "LastYear" |
"NextMonth" | "NextQuarter" | "NextWeek" | "NextYear" | "ThisMonth" | "ThisQuarter" | "ThisWeek" | "ThisYear"
| "Today" | "Tomorrow" | "YearToDate" | "Yesterday"
- name: filterOn
uid: 'excel!Excel.FilterCriteria#filterOn:member'
package: excel!
fullName: filterOn
summary: The property used by the filter to determine whether the values should stay visible.
remarks: >-
\[ [API set: ExcelApi 1.2](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]
#### Examples
```TypeScript
// Link to full sample:
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/54-worksheet/worksheet-auto-filter.yaml
// This function adds a percentage AutoFilter to the active worksheet
// and applies the filter to a column of the used range.
await Excel.run(async (context) => {
// Retrieve the active worksheet and the used range on that worksheet.
const sheet = context.workbook.worksheets.getActiveWorksheet();
const farmData = sheet.getUsedRange();
// Add a filter that will only show the rows with the top 50% of values in column 3.
sheet.autoFilter.apply(farmData, 3, {
criterion1: "50",
filterOn: Excel.FilterOn.topPercent
});
await context.sync();
});
```
isPreview: false
isDeprecated: false
syntax:
content: >-
filterOn: Excel.FilterOn | "BottomItems" | "BottomPercent" | "CellColor" | "Dynamic" | "FontColor" | "Values" |
"TopItems" | "TopPercent" | "Icon" | "Custom";
return:
type: >-
<xref uid="excel!Excel.FilterOn:enum" /> | "BottomItems" | "BottomPercent" | "CellColor" | "Dynamic" |
"FontColor" | "Values" | "TopItems" | "TopPercent" | "Icon" | "Custom"
- name: icon
uid: 'excel!Excel.FilterCriteria#icon:member'
package: excel!
fullName: icon
summary: The icon used to filter cells. Used with `icon` filtering.
remarks: '\[ [API set: ExcelApi 1.2](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'icon?: Excel.Icon;'
return:
type: '<xref uid="excel!Excel.Icon:interface" />'
- name: operator
uid: 'excel!Excel.FilterCriteria#operator:member'
package: excel!
fullName: operator
summary: The operator used to combine criterion 1 and 2 when using `custom` filtering.
remarks: '\[ [API set: ExcelApi 1.2](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'operator?: Excel.FilterOperator | "And" | "Or";'
return:
type: '<xref uid="excel!Excel.FilterOperator:enum" /> | "And" | "Or"'
- name: subField
uid: 'excel!Excel.FilterCriteria#subField:member'
package: excel!
fullName: subField
summary: The property used by the filter to do a rich filter on rich values.
remarks: '\[ [API set: ExcelApi 1.9](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'subField?: string;'
return:
type: string
- name: values
uid: 'excel!Excel.FilterCriteria#values:member'
package: excel!
fullName: values
summary: The set of values to be used as part of `values` filtering.
remarks: '\[ [API set: ExcelApi 1.2](/javascript/api/requirement-sets/excel/excel-api-requirement-sets) \]'
isPreview: false
isDeprecated: false
syntax:
content: 'values?: Array<string | FilterDatetime>;'
return:
type: 'Array<string | <xref uid="excel!Excel.FilterDatetime:interface" />>'