[]
Spread.Pivot.CustomPivotTableThemeManager
↳ CustomPivotTableThemeManager
• new CustomPivotTableThemeManager(workbook
)
Represents a custom pivot table theme manager that can manage all custom pivot table themes.
Name | Type | Description |
---|---|---|
workbook |
Workbook |
The workbook. |
CustomThemeManagerBase.constructor
▸ add(theme
): undefined
| PivotTableTheme
add a new pivot table theme.
example
// add a new pivot table theme named "custom0"
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
let pivotTableStyle = spread.customPivotTableThemes.add("custom0");
let wholeTableStyle = new GC.Spread.Pivot.PivotTableStyle();
wholeTableStyle.backColor = "#0C66E4";
tableStyle.wholeTableStyle(wholeTableStyle);
Name | Type | Description |
---|---|---|
theme |
string | PivotTableTheme |
the new pivot table theme or just a new pivot table theme name you want to add |
undefined
| PivotTableTheme
return the newly added pivot table theme, if the named pivot table theme is existed, failed to add pivot table theme and return undefined
▸ all(): PivotTableTheme
[]
get the pivot table themes collection.
example
// get all pivot table themes
let tableStylesCollection = spread.customPivotTableThemes.all();
Array<GC.Spread.Pivot.PivotTableTheme>
▸ get(name
): undefined
| PivotTableTheme
get the pivot table theme by name.
example
// get pivot table theme
pivotTableStyle = spread.customPivotTableThemes.get("custom0");
Name | Type | Description |
---|---|---|
name |
string |
the specific name of the pivot table theme to get |
undefined
| PivotTableTheme
If the corresponding pivot table theme with the spefic name is found, return the theme; otherwise, return undefined.
▸ remove(name
): void
remove the pivot table theme by name.
example
// delete pivot table theme
spread.customPivotTableThemes.remove("custom0");
Name | Type | Description |
---|---|---|
name |
string |
the specific name of the pivot table theme to remove |
void
▸ update(oldThemeName
, newTheme
): void
update the pivot table theme.
example
// update pivot table theme
tableStyle = spread.customPivotTableThemes.update("custom0", new GC.Spread.Pivot.PivotTableTheme());
Name | Type | Description |
---|---|---|
oldThemeName |
string |
the specific name of the pivot table theme to update |
newTheme |
PivotTableTheme |
the specific name of the pivot table theme to update |
void