[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPivotTable.TableStyle

TableStyle Property

TableStyle

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.

Declaration
string TableStyle { get; set; }
Property TableStyle As String
Examples
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;