[]
Gets the IPivotLines collection attached to this pivot axis.
The returned collection contains all pivot lines on the current axis. For a row axis, each pivot line represents a row in the pivot table axis area. For a column axis, each pivot line represents a column in the pivot table axis area.
IPivotLines PivotLines { get; }
ReadOnly Property PivotLines As IPivotLines
object[,] sourceData = new object[,] {
{"Category", "Product", "Amount"},
{"Beverages", "Tea", 100},
{"Beverages", "Coffee", 200},
{"Snacks", "Chips", 50}
};
worksheet.Range["A1:C4"].Value = sourceData;
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:C4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["E1"], "PivotTable1");
pivotTable.PivotFields["Category"].Orientation = PivotFieldOrientation.RowField;
IPivotLines pivotLines = pivotTable.PivotRowAxis.PivotLines;