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.
Retrieves the protection properties for the sheet.
The ISheetProtection.Properties object representing the current protection settings.
Returns true if the protection has a password.
Checks if the AutoFilter functionality is protected on the sheet.
true
if AutoFilter is locked, false
otherwise.
Checks if deleting columns is protected on the sheet.
true
if deleting columns is locked, false
otherwise.
Checks if deleting rows is protected on the sheet.
true
if deleting rows is locked, false
otherwise.
Checks if formatting cells is protected on the sheet.
true
if formatting cells is locked, false
otherwise.
Checks if formatting columns is protected on the sheet.
true
if formatting columns is locked, false
otherwise.
Checks if formatting rows is protected on the sheet.
true
if formatting rows is locked, false
otherwise.
Checks if inserting columns is protected on the sheet.
true
if inserting columns is locked, false
otherwise.
Checks if inserting hyperlinks is protected on the sheet.
true
if inserting hyperlinks is locked, false
otherwise.
Checks if inserting rows is protected on the sheet.
true
if inserting rows is locked, false
otherwise.
Checks if objects (e.g., charts, shapes) are protected on the sheet.
true
if objects are locked, false
otherwise.
Checks if the object has a locked but is paused.
true
if the object is locked but paused, false
otherwise.
Checks if pivot tables are protected on the sheet.
true
if pivot tables are locked, false
otherwise.
Checks if scenarios are protected on the sheet.
true
if scenarios are locked, false
otherwise.
Checks if selecting locked cells is protected on the sheet.
true
if selecting locked cells is locked, false
otherwise.
Checks if selecting unlocked cells is protected on the sheet.
true
if selecting unlocked cells is locked, false
otherwise.
Checks if sorting is protected on the sheet.
true
if sorting is 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 the protection settings for a sheet. Extends the base
IProtection
interface with additional sheet-specific protection options.