[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPivotItem.Name

Name Property

Name

Gets or sets the name of the pivot item.

Declaration
string Name { get; set; }
Property Name As String
Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Product", "Amount"},
    {"Apple", 100},
    {"Banana", 80},
    {"Apple", 120}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "SalesPivot");
IPivotField field = pivotTable.PivotFields["Product"];
field.Orientation = PivotFieldOrientation.RowField;
string name = field.PivotItems["Apple"].Name;