ws.settings
WorksheetSettings
Sub-API for worksheet settings operations.
7 methods
get
→ Promise<SheetSettingsInfo>get(): Promise<SheetSettingsInfo>;Get all sheet settings. @returns Current sheet settings
set
→ Promise<void>set<K extends keyof SheetSettingsInfo>(key: K, value: SheetSettingsInfo[K]): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| key | K | required |
| value | SheetSettingsInfo[K] | required |
Set an individual sheet setting by key. @param key - Setting key (e.g., 'showGridlines', 'defaultRowHeight') @param value - New value for the setting
getCustomLists
→ Promise<string[][]>getCustomLists(): Promise<string[][]>;Get the workbook-level custom sort lists. @returns Array of custom lists, each being an array of string values
setCustomLists
→ Promise<void>setCustomLists(lists: string[][]): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| lists | string[][] | required |
Replace all user-defined custom sort lists. @param lists - Array of custom lists to set
getStandardHeight
→ Promise<number>getStandardHeight(): Promise<number>;Get the standard (default) row height in pixels. This is the height used for rows that haven't been explicitly sized. Read-only (matches OfficeJS semantics).
getStandardWidth
→ Promise<number>getStandardWidth(): Promise<number>;Get the standard (default) column width in pixels. This is the width used for columns that haven't been explicitly sized.
setStandardWidth
→ Promise<void>setStandardWidth(width: number): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| width | number | required |
Set the standard (default) column width in pixels. This changes the default width for all columns that haven't been explicitly sized. @param width - New default column width in pixels