[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPivotItem.SourceName

SourceName Property

SourceName

Gets the name of this PivotTable item as it appears in the original source data.

This value can differ from the current item name if the item was renamed after the PivotTable was created.

Declaration
string SourceName { get; }
ReadOnly Property SourceName As String
Examples
worksheet.Range["A1:B3"].Value = new object[,] {
    {"Product", "Amount"},
    {"Coffee", 100},
    {"Tea", 200}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B3"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "SalesPivot");
IPivotField field = pivotTable.PivotFields["Product"];
field.Orientation = PivotFieldOrientation.RowField;
IPivotItem item = field.PivotItems["Coffee"];
string sourceName = item.SourceName;