Returns an iterator that allows you to iterate over the individual values within the range.
Optional
options: ICellRange.IteratorOptions<any>Configuration options for the iterator, such as filtering or sorting.
An iterator that yields Scalar
value, each representing a single cell within the range.
Add a listener to the range.
Optional
options: ListenerOptionsA callback to remove. IListener.Remove
Adjusts the column widths and rows heights to fit the content.
Optional
options: AutoFitOptionsCurrent ICellRange
.
Re-evaluates and formulas within the range.
Optional
fullRecalc: booleanIf true
then all formulas will be recalculated.
Clear the range.
Optional
applyTo: ContentOptional
options: OperationOptionsCurrent ICellRange
.
Copies (or cuts) data and formatting from a specified source to the current range.
The source of the data and formatting to be copied or cut.
This can be either a range address, another range object, or an ISnapshot
created using the getSnapshot
method.
Optional
options: ICellRange.CopyOptionsAdditional options for customizing the paste operation (e.g., transpose
, skipBlanks
).
A promise that resolve to an ICellRange
or 'null' when the copy has completed.
Delete the cells within the range and shifts the remaining cells to fill the gap.
Optional
orientation: IRange.OrientationThe direction in which to shift the remaining cells. Defaults to the orientation where the range's dimension is smaller (e.g., shifts left if the range is taller than it is wide). See ICellRange.getDefaultShiftOrientation for details on the default behavior.
Optional
options: OperationOptionsCurrent ICellRange
.
Perform a set of operations as a batch.
The callback return type.
Function to perform the operations.
Optional
options: string | OperationOptionsDescription of the operation or additional options. This will be used for tracking undo/redo and history.
The result of the callback.
Returns an iterator that allows you to iterate over the individual cells within the ranges,
yielding pairs of IteratorContext
and a Value
.
Optional
options: ICellRange.IteratorOptionsConfiguration options for the iterator, such as filtering or sorting.
An iterator that yields [ICell.IteratorContext, Value]
tuples for each value within the range.
If the ranges overlap this will return the same value multiple times. If each cell should only be visited once, use ICellRanges.getFlattened to remove overlaps.
Returns an iterator of ICells that match the results.
The text to search for.
Optional
options: FindOptionsReturns the Coords
an A1-style address string (e.g., 'A1' or 'A1:E5').
Returns the count for all columns in the ranges. This will ensure columns that are included in multiples ranges are not double counted.
The RangeCoords.
Returns the total number of contiguous ranges in this collection.
Returns the total number of contiguous ranges in this collection.
Returns the default shift IRange.Orientation for insert and delete if no orientation is provided.
Default IRange.Orientation
that will be used to shift the range.
Returns a range that includes the columns for the entire sheet.
For example, if the range is A1:B2
, this method will return A:B
.
Optional
shiftRows: booleanIf true
this will also shift the columns by the width of the range. default false
.
Optional
options: GetRangeOptionsAdditional options for getting the range.
ICellRange
at the repositioned range.
Returns a range that includes the rows for the entire sheet.
For example, if the range is A1:B2
, this method will return 1:2
.
Optional
shiftColumns: booleanIf true
this will also shift the rows by the height of the range. default false
.
Optional
options: GetRangeOptionsAdditional options for getting the range.
ICellRange
at the repositioned range.
Returns a ranges with coordinates adjusted to be fixed (absolute) or flexible (relative).
Returns a set of ranges with overlaps removed and attempts to merge adjacent ranges into larger ranges.
Optional
options: GetFlattenOptionsReturns the count for all rows in the ranges. This will ensure rows that are included in multiples ranges are not double counted.
Returns a ICellRange.ISnapshot
for all of the ranges.
Optional
options: ICellRange.CopyOptionsRetrieves an IStyle.Updater object for updating the styles of the range.
Unlike ICell.getStyle, which provides a read-only view of a cell's style, this method returns an updater object that allows modifications to the styles of all cells in the range.
A style updater for the range.
IStyle.Updater
are applied
to the entire range, overriding any mixed styles with the specified values.ICell
objects are immutable, while ICellRange
is the interface for mutable operations.Returns a range that excludes any hidden rows or columns.
Optional
options: GetVisibleOptionsOptional parameters that can adjust how visibility is determined (e.g., by ignoring specific visibility rules).
An ICellRanges
object that contains the visible portions of the range, excluding any hidden rows or columns.
ICellRanges
object with a single range and a length of 1
.null
.Insert a new, empty range within the sheet and shifts existing cells to accommodate it.
By default the values will direction in whichever direction the selection shape is smaller. For example a selection with a 5 column by 1 row will direction Down (rows). Note - This will error if direction data will fall outsize of the max sheet size.
Optional
orientation: IRange.OrientationThe direction in which to shift existing cells. Defaults to the orientation where the range's dimension is smaller (e.g., shifts down if the range is wider than it is tall). See ICellRange.getDefaultShiftOrientation for details on the default behavior.
Optional
options: OperationOptionsCurrent ICellRange
.
Inserts the contents of the source
into the sheet, shifting existing cells to make space.
The source of the data and formatting to insert.
This can be either a range address, another range object, or an ISnapshot
created using the getSnapshot
method.
Optional
options: InsertFromOptionsA promise that resolve to an ICellRange
or 'null' when the copy has completed.
Returns true if the range is invalid. This can occur if a range is removed or created with invalid coordinates.
Returns true
if any of the ranges are invalid.
Returns a flag indicating if any of the ranges are overlapping.
To get a range with no overlaps ICellRanges.getFlattened can be used.
Indicates if the range is readonly only.
Merges all cells within the selection ranges.
Optional
options: IRange.Orientations | MergeOptionsCurrent ICellRange
.
Selects the current range.
Optional
options: ICellRange.SelectOptionsAn async ICellRange
.
Returns the address as a string.
Unmerge all cells within the selection ranges.
Optional
options: OperationOptionsCurrent ICellRange
.
Update the style for the range(s).
Optional
options: UpdateOptionsCurrent ICellRange
.
An
ICellRanges
is a collection of ICellRanges.Useful when working with a discontinuous set of ranges.