[]
Represents a PivotTable value cell and provides access to its value and related IPivotCell when an actual cell range is not available.
public interface IPivotValueCell
Public Interface IPivotValueCell
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;
object value = valueCell.Value;
| Name | Description |
|---|---|
| PivotCell | Gets the IPivotCell that specifies the location of the PivotValueCell. |
| Value | Gets the value at the location. The value is the value after ShowAs and other calculations have been applied. The returned object can represent a blank, numeric, date, text, or error value. |