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.
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 the base protection functionality for both workbook and sheet protection. This interface provides methods for locking, unlocking, and managing the protection state.