Verifies if the provided password matches the current protection password.
Optional
password: stringThe password to check against the current protection.
true
if the password is correct, false
otherwise.
Returns true if the protection has a password.
Checks if the object has a locked but is paused.
true
if the object is locked but paused, false
otherwise.
Checks if workbook revisions are locked. Locking revisions prevents changes to the workbook without the revision password.
true
if revisions are locked, false
otherwise.
Checks if the workbook structure is locked. Locking the structure prevents changes like adding or deleting sheets.
true
if the structure is locked, false
otherwise.
Checks if workbook windows are locked. Locking the windows prevents changes to window position and size.
true
if windows are locked, false
otherwise.
Locks the object (workbook or sheet or range) with the specified options and password.
Optional
properties: Partial<P>The properties to allow to remain unlocked.
Optional
password: stringThe password required to unlock the object.
Optional
algorithm: stringThe algorithm for encrypting the password.
Optional
spinCount: numberThe spin count for encrypting the password.
The IProtection
instance for method chaining.
Temporarily disables protection with the provided password.
Optional
password: stringThe password required to pause protection.
The IProtection
instance for method chaining.
This method allows temporarily pausing protection without permanently unlocking the object. Use resume to restore protection.
Resumes protection that was previously paused.
The IProtection
instance for method chaining.
This method restores protection after it was paused using the pause method.
Unlocks the object (workbook or sheet) using the provided password.
Optional
password: stringThe password required to unlock the object.
The IProtection
instance for method chaining.
Interface representing protection settings for a workbook. This interface allows for getting and setting passwords, managing structure and window locks, and handling revision protection.