ws.customProperties
WorksheetCustomProperties
WorksheetCustomProperties — Sub-API for sheet-level custom properties. Provides a key-value store scoped to a single worksheet. Properties are persisted via sheet settings as a JSON-serialized object.
5 methods
get
→ Promise<string | number | boolean | undefined>get(key: string): Promise<string | number | boolean | undefined>;| Parameter | Type | Required |
|---|---|---|
| key | string | required |
Get a custom property value by key. @param key - Property key @returns The property value, or undefined if not set
set
→ Promise<void>set(key: string, value: string | number | boolean): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| key | string | required |
| value | string | number | boolean | required |
Set a custom property. @param key - Property key @param value - Property value (string, number, or boolean)
delete
→ Promise<boolean>delete(key: string): Promise<boolean>;| Parameter | Type | Required |
|---|---|---|
| key | string | required |
Delete a custom property. @param key - Property key to delete @returns True if the property existed and was deleted, false otherwise
getAll
→ Promise<Record<string, string | number | boolean>>getAll(): Promise<Record<string, string | number | boolean>>;Get all custom properties as a record. @returns Record of all custom property key-value pairs
count
→ Promise<number>count(): Promise<number>;Get the count of custom properties. @returns Number of custom properties currently set