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
getAuthor()@deprecated. Please use the ‘author’ property instead. Gets and sets the author.
setAuthor(string)@deprecated. Please use the ‘author’ property instead. Gets and sets the author.
getRecommendReadOnly()@deprecated. Please use the ‘recommendReadOnly’ property instead. Indicates if the Read Only Recommended option is selected.
setRecommendReadOnly(boolean)@deprecated. Please use the ‘recommendReadOnly’ property instead. Indicates if the Read Only Recommended option is selected.
isWriteProtected()@deprecated. Please use the ‘isWriteProtected’ property instead. Indicates whether this workbook is write protected.
getPassword()@deprecated. Please use the ‘password’ property instead. Sets the protected password to modify the file.
setPassword(string)@deprecated. Please use the ‘password’ property instead. 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.

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;

getAuthor()

@deprecated. Please use the ‘author’ property instead. Gets and sets the author.

getAuthor() : string;

setAuthor(string)

@deprecated. Please use the ‘author’ property instead. Gets and sets the author.

setAuthor(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getRecommendReadOnly()

@deprecated. Please use the ‘recommendReadOnly’ property instead. Indicates if the Read Only Recommended option is selected.

getRecommendReadOnly() : boolean;

setRecommendReadOnly(boolean)

@deprecated. Please use the ‘recommendReadOnly’ property instead. Indicates if the Read Only Recommended option is selected.

setRecommendReadOnly(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

isWriteProtected()

@deprecated. Please use the ‘isWriteProtected’ property instead. Indicates whether this workbook is write protected.

isWriteProtected() : boolean;

getPassword()

@deprecated. Please use the ‘password’ property instead. Sets the protected password to modify the file.

getPassword() : string;

setPassword(string)

@deprecated. Please use the ‘password’ property instead. 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;