WriteProtection

WriteProtection class

Specifies write protection settings for a workbook.

Properties

NameTypeDescription
AuthorStringGets and sets the author.
RecommendReadOnlybooleanIndicates if the Read Only Recommended option is selected.
IsWriteProtectedbooleanIndicates whether this workbook is write protected.
PasswordStringSets the protected password to modify the file.

Methods

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

WriteProtection.Author property

Gets and sets the author.

Type: String

WriteProtection.RecommendReadOnly property

Indicates if the Read Only Recommended option is selected.

Type: boolean

WriteProtection.IsWriteProtected property

Indicates whether this workbook is write protected.

Type: boolean

WriteProtection.Password property

Sets the protected password to modify the file.

Type: String

validatePassword(password)

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

ParameterTypeDescription
passwordStringThe specified password.