[]
Represents the collection of IPivotCell objects in a specific IPivotLine.
public interface IPivotLineCells : IEnumerable<IPivotCell>, IEnumerable
Public Interface IPivotLineCells
Inherits IEnumerable(Of IPivotCell), IEnumerable
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;
| Name | Description |
|---|---|
| Count | Gets the number of items in the PivotLineCells collection. |
| this[int] | Gets the IPivotCell at the specified index in this collection. |