[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPivotTable.TableRange1

TableRange1 Property

TableRange1

Gets the range that contains the entire PivotTable report, excluding page fields.

Use this property to access the rendered PivotTable area without including any page field region that is displayed separately from the main report.

Declaration
IRange TableRange1 { get; }
ReadOnly Property TableRange1 As IRange
Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Category", "Amount"},
    {"Fruit", 100},
    {"Fruit", 200},
    {"Vegetable", 150}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "SalesPivot");
pivotTable.PivotFields["Category"].Orientation = PivotFieldOrientation.RowField;
pivotTable.PivotFields["Amount"].Orientation = PivotFieldOrientation.DataField;
IRange range = pivotTable.TableRange1;
string address = range.ToString();