wb.protection
WorkbookProtection
4 methods
isProtected
→ Promise<boolean>isProtected(): Promise<boolean>;Check if the workbook structure is currently protected.
getOptions
→ Promise<WorkbookProtectionOptions | null>getOptions(): Promise<WorkbookProtectionOptions | null>;Get the current protection options, or null if the workbook is not protected.
protect
→ Promise<void>protect(password?: string, options?: Partial<WorkbookProtectionOptions>): Promise<void>;| Parameter | Type | Required |
|---|---|---|
| password | string | optional |
| options | Partial<WorkbookProtectionOptions> | optional |
Protect workbook structure with optional password and options.
unprotect
→ Promise<boolean>unprotect(password?: string): Promise<boolean>;| Parameter | Type | Required |
|---|---|---|
| password | string | optional |
Unprotect the workbook. Returns true if successful (password matches).