[]
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.
string SourceName { get; }
ReadOnly Property SourceName As String
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;