[]
Gets or sets the name of the filter.
Returns the name assigned to this PivotFilterOptions instance.
public string Name { get; set; }
Public Property Name As String
worksheet.Range["A1:B5"].Value = new object[,] {
{"Product", "Amount"},
{"Example Speaker", 4270},
{"Example Camera", 8239},
{"Example TV", 2626},
{"Example Smartphone", 8250}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B5"]);
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;
PivotFilterOptions options = new PivotFilterOptions();
options.Name = "HighValueSalesFilter";
IPivotFilter filter = productField.PivotFilters.Add(PivotFilterType.ValueGreaterThan, 7000, null, options);
string name = filter.Name;