ProtectedRange

ProtectedRange class

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

class ProtectedRange;

Properties

PropertyTypeDescription
namestringGets the Range title. This is used as a descriptor, not as a named range definition.
cellAreaCellAreaReadonly. Gets the CellArea object represents the cell area to be protected.
isProtectedWithPasswordbooleanReadonly. Indicates whether the worksheets is protected with password.
passwordstringRepresents the password to protect the range.
securityDescriptorstringThe security descriptor defines user accounts who may edit this range without providing a password to access the range.

Methods

MethodDescription
getAreas()Gets all referred areas.
addArea(number, number, number, number)Adds a referred area to this

name

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

name : string;

cellArea

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

cellArea : CellArea;

isProtectedWithPassword

Readonly. Indicates whether the worksheets is protected with password.

isProtectedWithPassword : boolean;

password

Represents the password to protect the range.

password : string;

securityDescriptor

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

securityDescriptor : string;

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.