[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPivotLineCells

IPivotLineCells Interface

Represents the collection of IPivotCell objects in a specific IPivotLine.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public interface IPivotLineCells : IEnumerable<IPivotCell>, IEnumerable
Public Interface IPivotLineCells
    Inherits IEnumerable(Of IPivotCell), IEnumerable
Examples
worksheet.Range["A1:C4"].Value = new object[,] {
    {"Category", "Product", "Amount"},
    {"Fruit", "Apple", 100},
    {"Fruit", "Orange", 200},
    {"Vegetable", "Carrot", 150}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:C4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["E1"], "SalesPivot");
pivotTable.PivotFields["Category"].Orientation = PivotFieldOrientation.RowField;
pivotTable.PivotFields["Amount"].Orientation = PivotFieldOrientation.DataField;
IPivotLine pivotLine = pivotTable.PivotRowAxis.PivotLines[0];
IPivotLineCells cells = pivotLine.PivotLineCells;
int count = cells.Count;

Properties

Name Description
Count

Gets the number of items in the PivotLineCells collection.

this[int]

Gets the IPivotCell at the specified index in this collection.