[]
Gets the range that contains the page area in the PivotTable report.
The page area is the report filter area that displays fields whose orientation is set to page fields.
This property returns null if the PivotTable does not currently have a page area.
IRange PageRange { get; }
ReadOnly Property PageRange As IRange
worksheet.Range["A1:C5"].Value = new object[,] {
{"Region", "Product", "Amount"},
{"East", "Apple", 100},
{"East", "Pear", 80},
{"West", "Apple", 90},
{"West", "Pear", 70}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:C5"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["E1"], "SalesPivot");
pivotTable.PivotFields["Region"].Orientation = PivotFieldOrientation.PageField;
IRange pageRange = pivotTable.PageRange;