ProtectedRange
ProtectedRange class
A specified range to be allowed to edit when the sheet protection is ON.
class ProtectedRange;
Properties
| Property | Type | Description |
|---|---|---|
| name | string | Gets the Range title. This is used as a descriptor, not as a named range definition. |
| cellArea | CellArea | Readonly. Gets the CellArea object represents the cell area to be protected. |
| isProtectedWithPassword | boolean | Readonly. Indicates whether the worksheets is protected with password. |
| password | string | Represents the password to protect the range. |
| securityDescriptor | string | The security descriptor defines user accounts who may edit this range without providing a password to access the range. |
Methods
| Method | Description |
|---|---|
| getName() | @deprecated. Please use the ’name’ property instead. Gets the Range title. This is used as a descriptor, not as a named range definition. |
| setName(string) | @deprecated. Please use the ’name’ property instead. Gets the Range title. This is used as a descriptor, not as a named range definition. |
| getCellArea() | @deprecated. Please use the ‘cellArea’ property instead. Gets the CellArea object represents the cell area to be protected. |
| isProtectedWithPassword() | @deprecated. Please use the ‘isProtectedWithPassword’ property instead. Indicates whether the worksheets is protected with password. |
| getPassword() | @deprecated. Please use the ‘password’ property instead. Represents the password to protect the range. |
| setPassword(string) | @deprecated. Please use the ‘password’ property instead. Represents the password to protect the range. |
| getSecurityDescriptor() | @deprecated. Please use the ‘securityDescriptor’ property instead. The security descriptor defines user accounts who may edit this range without providing a password to access the range. |
| setSecurityDescriptor(string) | @deprecated. Please use the ‘securityDescriptor’ property instead. 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. |
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;
getName()
@deprecated. Please use the ’name’ property instead. Gets the Range title. This is used as a descriptor, not as a named range definition.
getName() : string;
setName(string)
@deprecated. Please use the ’name’ property instead. Gets the Range title. This is used as a descriptor, not as a named range definition.
setName(value: string) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | string | The value to set. |
getCellArea()
@deprecated. Please use the ‘cellArea’ property instead. Gets the CellArea object represents the cell area to be protected.
getCellArea() : CellArea;
Returns
isProtectedWithPassword()
@deprecated. Please use the ‘isProtectedWithPassword’ property instead. Indicates whether the worksheets is protected with password.
isProtectedWithPassword() : boolean;
getPassword()
@deprecated. Please use the ‘password’ property instead. Represents the password to protect the range.
getPassword() : string;
setPassword(string)
@deprecated. Please use the ‘password’ property instead. Represents the password to protect the range.
setPassword(value: string) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | string | The value to set. |
getSecurityDescriptor()
@deprecated. Please use the ‘securityDescriptor’ property instead. The security descriptor defines user accounts who may edit this range without providing a password to access the range.
getSecurityDescriptor() : string;
setSecurityDescriptor(string)
@deprecated. Please use the ‘securityDescriptor’ property instead. The security descriptor defines user accounts who may edit this range without providing a password to access the range.
setSecurityDescriptor(value: string) : void;
Parameters:
| Parameter | Type | Description |
|---|---|---|
| value | string | The 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:
| Parameter | Type | Description |
|---|---|---|
| startRow | number | The start row. |
| startColumn | number | The start column. |
| endRow | number | The end row. |
| endColumn | number | The end column. |
isNull()
Checks whether the implementation object is null.
isNull() : boolean;