wb.tableStyles
WorkbookTableStyles
7 methods
list
→ Promise<TableStyleInfoWithReadOnly[]>list(): Promise<TableStyleInfoWithReadOnly[]>;Get all table styles (built-in + custom) with a `readOnly` flag.
add
→ Promise<string>add(name: string, style: TableStyleConfig): Promise<string>;| Parameter | Type | Required |
|---|---|---|
| name | string | required |
| style | TableStyleConfig | required |
Create a custom table style. Returns the style name/ID.
update
→ Promise<void>update(name: string, style: Partial<TableStyleConfig>): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| name | string | required |
| style | Partial<TableStyleConfig> | required |
Update a custom table style.
remove
→ Promise<void>remove(name: string): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| name | string | required |
Remove a custom table style.
getDefault
→ Promise<string | undefined>getDefault(): Promise<string | undefined>;Get the default table style ID applied to new tables.
setDefault
→ Promise<void>setDefault(name: string | undefined): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| name | string | undefined | required |
Set the default table style ID for new tables. Pass undefined to reset.
duplicate
→ Promise<TableStyleInfo>duplicate(name: string, newName: string): Promise<TableStyleInfo>;| Parameter | Type | Required |
|---|---|---|
| name | string | required |
| newName | string | required |
Duplicate an existing table style. Returns the new style info.