WriteProtection

WriteProtection class

Specifies write protection settings for a workbook.

class WriteProtection;

Constructors

NameDescription
constructor()Default Constructor.

Methods

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

constructor()

Default Constructor.

constructor();

getAuthor()

Gets and sets the author.

getAuthor() : string;

setAuthor(string)

Gets and sets the author.

setAuthor(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getRecommendReadOnly()

Indicates if the Read Only Recommended option is selected.

getRecommendReadOnly() : boolean;

setRecommendReadOnly(boolean)

Indicates if the Read Only Recommended option is selected.

setRecommendReadOnly(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isWriteProtected()

Indicates whether this workbook is write protected.

isWriteProtected() : boolean;

getPassword()

Sets the protected password to modify the file.

getPassword() : string;

setPassword(string)

Sets the protected password to modify the file.

setPassword(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

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.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;