ProtectedRange

ProtectedRange class

A specified range to be allowed to edit when the sheet protection is ON.

class ProtectedRange;

Methods

MethodDescription
getName()Gets the Range title. This is used as a descriptor, not as a named range definition.
setName(string)Gets the Range title. This is used as a descriptor, not as a named range definition.
getCellArea()Gets the CellArea object represents the cell area to be protected.
isProtectedWithPassword()Indicates whether the worksheets is protected with password.
getPassword()Represents the password to protect the range.
setPassword(string)Represents the password to protect the range.
getSecurityDescriptor()The security descriptor defines user accounts who may edit this range without providing a password to access the range.
setSecurityDescriptor(string)The security descriptor defines user accounts who may edit this range without providing a password to access the range.
getAreas()Gets all referred areas.
addArea(number, number, number, number)Adds a referred area to this
isNull()Checks whether the implementation object is null.

getName()

Gets the Range title. This is used as a descriptor, not as a named range definition.

getName() : string;

setName(string)

Gets the Range title. This is used as a descriptor, not as a named range definition.

setName(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getCellArea()

Gets the CellArea object represents the cell area to be protected.

getCellArea() : CellArea;

Returns

CellArea

isProtectedWithPassword()

Indicates whether the worksheets is protected with password.

isProtectedWithPassword() : boolean;

getPassword()

Represents the password to protect the range.

getPassword() : string;

setPassword(string)

Represents the password to protect the range.

setPassword(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getSecurityDescriptor()

The security descriptor defines user accounts who may edit this range without providing a password to access the range.

getSecurityDescriptor() : string;

setSecurityDescriptor(string)

The security descriptor defines user accounts who may edit this range without providing a password to access the range.

setSecurityDescriptor(value: string) : void;

Parameters:

ParameterTypeDescription
valuestringThe value to set.

getAreas()

Gets all referred areas.

getAreas() : CellArea[];

Returns

Returns all referred areas.

addArea(number, number, number, number)

Adds a referred area to this

addArea(startRow: number, startColumn: number, endRow: number, endColumn: number) : void;

Parameters:

ParameterTypeDescription
startRownumberThe start row.
startColumnnumberThe start column.
endRownumberThe end row.
endColumnnumberThe end column.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;