Excel.ValueFilterCondition enum

値フィルターを適用できる、受け入れられるすべての条件を表す列挙型。 フィールドに適用される PivotFilter の種類を構成するために使用します。 PivotFilter.exclusive を に true 設定して、これらの条件の多くを反転させることができます。

注釈

[ API セット: ExcelApi 1.12 ]

// 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"

と 条件のupperBoundlowerBound

必須条件: {value、、upperBoundlowerBound}。 オプションの条件: {exclusive}

bottomN = "BottomN"

下の N (threshold) [items, percent, sum] の値カテゴリ。

必須条件: {value、、selectionTypethreshold}

equals = "Equals"

比較条件に等しい。

必須の条件: {value, comparator}. オプションの条件: {exclusive}

greaterThan = "GreaterThan"

比較条件より大きい。

必須の条件: {value, comparator}.

greaterThanOrEqualTo = "GreaterThanOrEqualTo"

比較条件以上。

必須の条件: {value, comparator}.

lessThan = "LessThan"

比較条件より小さい。

必須の条件: {value, comparator}.

lessThanOrEqualTo = "LessThanOrEqualTo"

比較条件以下。

必須の条件: {value, comparator}.

topN = "TopN"

値カテゴリの上位 N (threshold) [items, percent, sum] で。

必須条件: {value、、selectionTypethreshold}

unknown = "Unknown"

ValueFilterCondition が不明であるか、サポートされていません。