[]
Gets the number of pivot filters in the collection.
This property returns the current count of filters that have been added to a pivot field through PivotFilters.
int Count { get; }
ReadOnly Property Count As Integer
worksheet.Range["G1:H4"].Value = new object[,] {
{"Product", "Amount"},
{"Example Speaker", 4270},
{"Example TV", 2626},
{"Example Phone", 2417}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["G1:H4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["A1"], "PivotTable1");
IPivotField fieldProduct = pivotTable.PivotFields["Product"];
fieldProduct.Orientation = PivotFieldOrientation.RowField;
fieldProduct.PivotFilters.Add(PivotFilterType.CaptionContains, "mi");
int count = fieldProduct.PivotFilters.Count;