The item at the given index, or undefined if there is none — wb.getWorksheets()[0].
ReadonlyisFor runtime type checking.
ReadonlyisFor runtime type checking.
ReadonlylengthThe number of items — the same as getCount.
Iterates the collection's items.
The unfiltered walk — for (const sheet of wb.getWorksheets()). Every other iterable surface in
the SDK (ICellRange, ICellRegions, ICellRanges) reads this way, so a collection that did
not was a trap: for…of over one is the obvious line to write and it threw at runtime with
nothing in the types to warn first.
getItems remains the call that takes options — filtering, ordering, anything parameterized. This is sugar over the unfiltered case, not a replacement for it.
The id of value, added when no equal value is here.
A rich value. Never an error: an error is stored by its code.
Add Listeners.
Optionaloptions: IListener.OptionsReturns the item at the given index, or undefined if there is none.
The position in iteration order. A negative index counts back from the end, as
Array.prototype.at does.
Starts saving or loading the rich values cells name. Scopes begun while one is open share its ids, so a workbook and its sheets agree on them.
Returns true if the predicate accepts every item, including when there are none.
Called once per item in iteration order until it returns false.
Returns the items the predicate accepts, in iteration order.
Called once per item.
Returns the first item the predicate accepts, or undefined if it accepts none.
Called once per item in iteration order until it returns true.
Returns the index of the first item the predicate accepts, or -1 if it accepts none.
Called once per item in iteration order until it returns true.
Calls the function once per item, in iteration order.
Called once per item.
The value for an id, or null if not found.
The id add answered.
Returns the items in the collection.
Optionaloptions: ICollection.GetItemsOptionsThe optioned call — filtering, ordering, anything parameterized — and a snapshot: the array returned does not follow later changes to the collection. For the unfiltered items as a plain array prefer toArray.
Returns the index of the item in iteration order, or -1 if it is not in the collection.
The item to find.
Returns true once the collection has been closed.
A closed collection is empty and announces nothing further. Collections that are closed by
their owner (the workbook's names, functions and modules, when the workbook closes) announce
it once with ICollection.Events.onClose; the others are never closed and always
return false.
Returns true if the predicate accepts at least one item.
Called once per item in iteration order until it returns true.
The rich values a workbook's cells hold, interned: a cell run stores a rich value as its id here, as it stores a string as its id in the string collection.
Remarks
Equal values share one id (equal JSON; a resource counts by identity), so recalculating a formula that makes a new but equal value adds nothing. Values are not removed: a save writes only the ones a cell holds.