Skip to content
Mog is in active development. The GitHub repo, SDK packages, and community channels are not yet available. Follow for launch updates

wb.pivotTableStyles

WorkbookPivotTableStyles

5 methods

getDefault

Promise<string>
getDefault(): Promise<string>;

Get the workbook's default pivot table style preset. Returns 'PivotStyleLight16' if not explicitly set.

setDefault

Promise<void>
setDefault(style: string | null): Promise<void>;
ParameterTypeRequired
stylestring | nullrequired

Set the workbook's default pivot table style preset. Pass null to reset to 'PivotStyleLight16'.

getCount

Promise<number>
getCount(): Promise<number>;

Get the count of built-in pivot table styles.

getItem

Promise<PivotTableStyleInfo | null>
getItem(name: string): Promise<PivotTableStyleInfo | null>;
ParameterTypeRequired
namestringrequired

Get a pivot table style by name, or null if not found.

list

Promise<PivotTableStyleInfo[]>
list(): Promise<PivotTableStyleInfo[]>;

List all built-in pivot table styles.