[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPivotLine.PivotLineCells

PivotLineCells Property

PivotLineCells

Gets the collection of pivot cells in this pivot line.

Use this property to access the IPivotCell objects that belong to the current row or column line in a PivotTable axis.

Declaration
IPivotLineCells PivotLineCells { get; }
ReadOnly Property PivotLineCells As IPivotLineCells
Examples
object[,] sourceData = {
    {"Product", "Category", "Amount"},
    {"Bose 785593-0050", "Consumer Electronics", 4270},
    {"Iphone XR", "Mobile", 9062}
};
worksheet.Range["G1:I3"].Value = sourceData;
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["G1:I3"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["A1"], "SalesPivot");
pivotTable.PivotFields["Category"].Orientation = PivotFieldOrientation.RowField;
pivotTable.PivotFields["Amount"].Orientation = PivotFieldOrientation.DataField;
IPivotLine pivotLine = pivotTable.PivotRowAxis.PivotLines[0];
IPivotLineCells pivotLineCells = pivotLine.PivotLineCells;