WriteProtection

WriteProtection class

Specifies write protection settings for a workbook.

Methods

NameDescription
getAuthor()Gets and sets the author.
getPassword()Sets the protected password to modify the file.
getRecommendReadOnly()Indicates if the Read Only Recommended option is selected.
isWriteProtected()Indicates whether this workbook is write protected.
setAuthor()Gets and sets the author.
setPassword()Sets the protected password to modify the file.
setRecommendReadOnly()Indicates if the Read Only Recommended option is selected.
validatePassword(password)Returns true if the specified password is the same as the write-protection password the file was protected with.

getAuthor()

Gets and sets the author.

getPassword()

Sets the protected password to modify the file.

getRecommendReadOnly()

Indicates if the Read Only Recommended option is selected.

isWriteProtected()

Indicates whether this workbook is write protected.

setAuthor()

Gets and sets the author.

setPassword()

Sets the protected password to modify the file.

setRecommendReadOnly()

Indicates if the Read Only Recommended option is selected.

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.

Returns: boolean — boolean