[]
Gets the name of the pivot filter.
Use this property to retrieve the filter name for a filter created through PivotFilters.
string Name { get; }
ReadOnly Property Name As String
worksheet.Range["A1:B3"].Value = new object[,] {
{"Product", "Amount"},
{"Mi Band", 100},
{"Canon EOS", 200}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B3"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "SalesPivot");
IPivotField productField = pivotTable.PivotFields["Product"];
productField.Orientation = PivotFieldOrientation.RowField;
pivotTable.PivotFields["Amount"].Orientation = PivotFieldOrientation.DataField;
IPivotFilter pivotFilter = productField.PivotFilters.Add(PivotFilterType.CaptionContains, "Mi");
string filterName = pivotFilter.Name;