Skip to content
Mog is in active development. The GitHub repo, SDK packages, and community channels are not yet available. Follow for launch updates

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>;
ParameterTypeRequired
keyKrequired
valueSheetSettingsInfo[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>;
ParameterTypeRequired
listsstring[][]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>;
ParameterTypeRequired
widthnumberrequired

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