[]
Gets or sets whether banded rows are displayed in the PivotTable so that even rows are formatted differently from odd rows.
When this property is true, the PivotTable style applies alternating row formatting to improve readability.
bool ShowTableStyleRowStripes { get; set; }
Property ShowTableStyleRowStripes As Boolean
worksheet.Range["A1:B4"].Value = new object[,] {
{"Category", "Amount"},
{"Beverages", 120},
{"Snacks", 95},
{"Beverages", 80}
};
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;
bool showRowStripes = pivotTable.ShowTableStyleRowStripes;