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