[]
Specifies the location of a field in a PivotTable report.
Use this enum with Orientation to place a pivot field in the row area, column area, page area, data area, or to hide the field.
public enum PivotFieldOrientation
Public Enum PivotFieldOrientation
object[,] sourceData = {
{"Product", "Region", "Amount"},
{"Apple", "East", 120},
{"Apple", "West", 80},
{"Orange", "East", 90}
};
worksheet.Range["A1:C4"].Value = sourceData;
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:C4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["E1"], "SalesPivot");
pivotTable.PivotFields["Region"].Orientation = PivotFieldOrientation.RowField;
| Name | Description |
|---|---|
| ColumnField | Specifies column. |
| DataField | Specifies data. |
| Hidden | Specifies hidden. |
| PageField | Specifies page. |
| RowField | Specifies row. |