ProtectedRangeCollection

ProtectedRangeCollection class

Encapsulates a collection of ProtectedRange objects.

class ProtectedRangeCollection;

Methods

MethodDescription
get(number)Gets the ProtectedRange element at the specified index.
add(string, number, number, number, number)Adds a ProtectedRange item to the collection.

get(number)

Gets the ProtectedRange element at the specified index.

get(index: number) : ProtectedRange;

Parameters:

ParameterTypeDescription
indexnumberThe zero based index of the element.

Returns

The element at the specified index.

add(string, number, number, number, number)

Adds a ProtectedRange item to the collection.

add(name: string, startRow: number, startColumn: number, endRow: number, endColumn: number) : number;

Parameters:

ParameterTypeDescription
namestringRange title. This is used as a descriptor, not as a named range definition.
startRownumberStart row index of the range.
startColumnnumberStart column index of the range.
endRownumberEnd row index of the range.
endColumnnumberEnd column index of the range.

Returns

object index.