[]
Gets or sets the style applied to the pivot table.
This property returns the current ITableStyle associated with the pivot table.
If no style has been applied, this property returns null.
ITableStyle Style { get; set; }
Property Style As ITableStyle
worksheet.Range["A1:B4"].Value = new object[,] {
{"Name", "Amount"},
{"A", 100},
{"B", 200},
{"A", 150}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "SalesPivot");
pivotTable.Style = workbook.TableStyles["PivotStyleMedium3"];
ITableStyle style = pivotTable.Style;
string styleName = style.Name;