Skip to content
Mog is in active development. The GitHub repo and npm SDK packages are available now; community channels are still being prepared. Follow for launch updates

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>;
ParameterTypeRequired
namestringrequired
styleTableStyleConfigrequired

Create a custom table style. Returns the style name/ID.

update

Promise<void>
update(name: string, style: Partial<TableStyleConfig>): Promise<void>;
ParameterTypeRequired
namestringrequired
stylePartial<TableStyleConfig>required

Update a custom table style.

remove

Promise<void>
remove(name: string): Promise<void>;
ParameterTypeRequired
namestringrequired

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>;
ParameterTypeRequired
namestring | undefinedrequired

Set the default table style ID for new tables. Pass undefined to reset.

duplicate

Promise<TableStyleInfo>
duplicate(name: string, newName: string): Promise<TableStyleInfo>;
ParameterTypeRequired
namestringrequired
newNamestringrequired

Duplicate an existing table style. Returns the new style info.