[]
Gets or sets whether the PivotTable report shows grand totals for rows.
Use this property to determine whether the PivotTable displays a grand total row for the row fields.
bool RowGrand { get; set; }
Property RowGrand As Boolean
worksheet.Range["A1:B4"].Value = new object[,] {
{"Region", "Amount"},
{"East", 120},
{"West", 150},
{"East", 90}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "SalesPivot");
pivotTable.PivotFields["Region"].Orientation = PivotFieldOrientation.RowField;
pivotTable.PivotFields["Amount"].Orientation = PivotFieldOrientation.DataField;
bool showRowGrand = pivotTable.RowGrand;