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

wb.protection

WorkbookProtection

2 methods

protect

Promise<void>
protect(password?: string, options?: Partial<WorkbookProtectionOptions>): Promise<void>;
ParameterTypeRequired
passwordstringoptional
optionsPartial<WorkbookProtectionOptions>optional

Protect workbook structure with optional password and options.

unprotect

Promise<boolean>
unprotect(password?: string): Promise<boolean>;
ParameterTypeRequired
passwordstringoptional

Unprotect the workbook. Returns true if successful (password matches).