[]
Gets or sets the style used in the body of the PivotTable report.
The default value is a null string, which indicates that no style is applied.
string TableStyle { get; set; }
Property TableStyle As String
worksheet.Range["A1:B4"].Value = new object[,] {
{"Category", "Amount"},
{"Beverages", 120},
{"Beverages", 80},
{"Snacks", 95}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "SalesPivot");
pivotTable.TableStyle = "PivotStyleMedium9";
string styleName = pivotTable.TableStyle;