For runtime type checking.
Returns the size of the range this is the width * height.
Returns an iterator that allows you to iterate over the individual values within the range.
For more advanced iteration, use IRange.entries or IRange.forEach.
Applies a callback function to elements from this range and another range or a scalar, using NumPy-style broadcasting.
Broadcasting Rules:
other
is a scalar, it is broadcasted to match the shape of this range.other
is a range, both ranges must have the same length.A new range with the broadcasted results.
Returns a range of 0x0.
Returns an iterator that allows you to iterate over the individual entries within the range,
yielding pairs of IRange.CellCoords
and Scalar
.
Optional
options: IteratorOptionsIRange.IteratorOptions
An iterator that yields a IRange.Entry for each value within the range.
Tests whether all elements in the range pass the test implemented by the provided function.
The function to test each element.
Optional
options: IteratorOptionsIRange.IteratorOptions
true
if all elements pass the test, otherwise false
.
Returns a new range with all values set to a specific value.
The value to fill
Optional
minWidth: numberA fixed width for the range. DefaultValue original width
.
Optional
minHeight: numberA fixed height for the range. DefaultValue original height
.
Creates a new range with elements that pass the test implemented by the provided function.
The function to test each element.
Optional
options: IteratorOptionsIRange.IteratorOptions
A new range containing only the elements that pass the test.
Returns the values as an array of values.
Optional
options: IteratorOptionsIRange.IteratorOptions
Iterates over the cells within the range, applying the provided callback function to each cell.
This method is a more scalable alternative to getValues
or getCells
for large or sparse ranges,
as it:
A function that will be called for each non-empty cell in the range. The callback receives:
value
: The Scalar
at the current cell.coords
: A IRange.CellCoords
.{ break: T }
to stop the iteration early.Optional
options: IteratorOptionsIRange.IteratorOptions
The value returned by the callback function if it explicitly returned to stop the iteration early; otherwise, void
.
Returns the height of the range.
Indicates if the range has a type.
Returns a scalar value at a specific row and column index.
The row index of the value to retrieve.
The column index of the value to retrieve.
Optional
options: ValueOptionsIRange.GetValuesOptions
Returns a value at a specific row and column index.
Returns the width of the range.
Intersects two ranges and applies a callback function to elements.
A new range with the intersected results or null
if the ranges do not intersect.
Returns true
if the range is a literal range from a parameter.
Applies a function against an accumulator and each element of the range (from left to right) to reduce it to a single value.
The reduced value.
Returns a new range either trimmed or expanded to fix the new width/height.
Optional
fillValue: ScalarTests whether at least one element in the range passes the test implemented by the provided function.
The function to test each element.
Optional
options: IteratorOptionsIRange.IteratorOptions
true
if at least one element passes the test, otherwise false
.
Creates a IncrementalUpdater
for efficiently updating sparsely populated cells in a streaming low memory way.
Optional
options: StartUpdateOptionsIRange.StartUpdateOptions
Ordering: By default updates must be added in either row-major or column-major order, as specified
by the orientation
parameter, with major/minor coordinates increasing monotonically. Unless
allowUnorderedWrites
is set to `true out of order updates will result in an error.
Performance: Setting orientation
to IRange.Orientation.Column
is generally faster as it aligns with the internal data representation.
Performance: Setting allowUnorderedWrites
adds a nominal performance overhead for all updates and will do a full apply when an
out of order update is detected.
The default IRange.Orientation.Row
is provided for compatibility with common spreadsheet APIs.
Validation: Data validation (e.g., for protected cells or boundaries) is performed when the apply
method is called.
Transactions:
IncrementalUpdater
only builds a temporary representation of the updates.
No actual changes are made to the sheet until apply
is called.doBatch
.Returns a string representation of the range.
Change the type of default range coercion for the values in the range.
The new scalar type.
Returns the range transposed.
A range that belongs to a container; usually a sheet.