[]
Represents a cell in a PivotTable report.
public interface IPivotCell
Public Interface IPivotCell
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;
IPivotValueCell valueCell = pivotTable.PivotValueCell(0, 0);
IPivotCell pivotCell = valueCell.PivotCell;
PivotCellType cellType = pivotCell.PivotCellType;
| Name | Description |
|---|---|
| ColumnItems | Gets a PivotItemList collection that corresponds to the items on the column axis that represent the selected range. |
| CustomSubtotalFunction | Gets the custom subtotal function field setting of a PivotCell object. |
| DataField | Gets a PivotField object that corresponds to the selected data field. |
| PivotCellType | Gets a constant that identifies the PivotTable entity the cell corresponds to. |
| PivotColumnLine | Gets the PivotLine corresponding to the column where the PivotCell is located. |
| PivotField | Gets a PivotField object that represents the PivotTable field that contains the upper-left corner of the specified range. |
| PivotItem | Gets a PivotItem object that represents the PivotTable item containing the upper-left corner of the specified range. |
| PivotRowLine | Gets the PivotLine corresponding to the row where the PivotCell is located. |
| PivotTable | Gets the PivotTable that contains this pivot cell, or the PivotTable associated with a PivotChart. |
| Range | Gets a Range object that represents the range the specified PivotCell applies to. |
| RowItems | Gets a PivotItemList collection that corresponds to the items on the category axis that represent the selected cell. |