WriteProtection

WriteProtection class

Specifies write protection settings for a workbook.

class WriteProtection;

Properties

PropertyTypeDescription
authorstringGets and sets the author.
recommendReadOnlybooleanIndicates if the Read Only Recommended option is selected.
isWriteProtectedbooleanReadonly. Indicates whether this workbook is write protected.
passwordstringSets the protected password to modify the file.

Methods

MethodDescription
validatePassword(string)Returns true if the specified password is the same as the write-protection password the file was protected with.

author

Gets and sets the author.

author : string;

recommendReadOnly

Indicates if the Read Only Recommended option is selected.

recommendReadOnly : boolean;

isWriteProtected

Readonly. Indicates whether this workbook is write protected.

isWriteProtected : boolean;

password

Sets the protected password to modify the file.

password : string;

validatePassword(string)

Returns true if the specified password is the same as the write-protection password the file was protected with.

validatePassword(password: string) : boolean;

Parameters:

ParameterTypeDescription
passwordstringThe specified password.