ExcelScript.PivotLabelFilter interface
PivotField に適用するラベル フィルター用の構成可能なテンプレート。 は condition
、フィルターを動作させるために設定する必要がある条件を定義します。
注釈
例
/**
* This script filters items that start with "L" from the "Type" field
* of the "Farm Sales" PivotTable.
*/
function main(workbook: ExcelScript.Workbook) {
// Get the PivotTable.
const pivotTable = workbook.getActiveWorksheet().getPivotTable("Farm Sales");
// Get the "Type" field.
const field = pivotTable.getHierarchy("Type").getPivotField("Type");
// Filter out any types that start with "L" (such as "Lemons" and "Limes").
const filter: ExcelScript.PivotLabelFilter = {
condition: ExcelScript.LabelFilterCondition.beginsWith,
substring: "L",
exclusive: true
};
// Apply the label filter to the field.
field.applyFilter({ labelFilter: filter });
}
プロパティ
condition | 必要なフィルター条件を定義するフィルターの条件を指定します。 |
exclusive | の場合 |
lower |
フィルター条件の範囲 |
substring | 、、および フィルター条件に |
upper |
フィルター条件の範囲の |
プロパティの詳細
condition
必要なフィルター条件を定義するフィルターの条件を指定します。
condition: LabelFilterCondition;
プロパティ値
exclusive
の場合true
、フィルターは条件を満たす項目を除外します。 既定値は (条件を満たす項目を含むフィルター) です false
。
exclusive?: boolean;
プロパティ値
boolean
lowerBound
フィルター条件の範囲 between
の下限。 注: 数値文字列は、他の数値文字列と比較されるときに数値として扱われます。
lowerBound?: string;
プロパティ値
string
substring
、、および フィルター条件にbeginsWith
endsWith
contains
使用される部分文字列。
substring?: string;
プロパティ値
string
upperBound
フィルター条件の範囲の between
上限。 注: 数値文字列は、他の数値文字列と比較されるときに数値として扱われます。
upperBound?: string;
プロパティ値
string
Office Scripts
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示