Excel.ValueFilterCondition enum
値フィルターを適用できるすべての受け入れ可能な条件を表す列挙型。 フィールドに適用されるピボットフィルターの種類を構成するために使用します。
PivotFilter.exclusive
true に設定すると、こうした条件の多くを反転できます。
注釈
使用元
例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/excel/38-pivottable/pivottable-pivotfilters.yaml
await Excel.run(async (context) => {
// Add a PivotFilter to filter on the values correlated with a row.
// Get the PivotTable.
const pivotTable = context.workbook.worksheets.getActiveWorksheet().pivotTables.getItem("Farm Sales");
// Get the "Farm" field.
const field = pivotTable.hierarchies.getItem("Farm").fields.getItem("Farm");
// Filter to only include rows with more than 500 wholesale crates sold.
const filter: Excel.PivotValueFilter = {
condition: Excel.ValueFilterCondition.greaterThan,
comparator: 500,
value: "Sum of Crates Sold Wholesale"
};
// Apply the value filter to the field.
field.applyFilter({ valueFilter: filter });
await context.sync();
});
フィールド
| between = "Between" |
必須条件: { |
| bottomN = "BottomN" | 値カテゴリの下位 N ( 必須条件: { |
| equals = "Equals" | コンパレーター条件と等しくなります。 必須条件: { |
| greaterThan = "GreaterThan" | コンパレーターの条件より大きい。 必須条件: { |
| greaterThanOrEqualTo = "GreaterThanOrEqualTo" | コンパレーター条件以上。 必須条件: { |
| lessThan = "LessThan" | コンパレーターの条件より小さい。 必須条件: { |
| lessThanOrEqualTo = "LessThanOrEqualTo" | コンパレーターの条件以下。 必須条件: { |
| topN = "TopN" | 値カテゴリの上位 N ( 必須条件: { |
| unknown = "Unknown" |
|