ReadonlyisFor runtime type checking.
ReadonlyisFor runtime type checking.
Iterates the collection's items.
The unfiltered walk — for (const sheet of wb.getSheets()). 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.
Adds a comment to a cell.
The cell. An address naming more than one cell throws, as Excel's does.
The text, or formatting runs for a note.
Optionaloptions: ICommentCollection.AddOptions
A cell holds one comment; adding to a cell that has one throws unless ICommentCollection.AddOptions.replaceExisting is set. Available on a sheet's collection; the workbook's is a view.
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.
Returns the comment on the given cell, or null if there is none.
A cell. For a larger address, the first comment within it in reading order.
Returns the comment with the given id, or null if there is none.
Returns the comment a reply belongs to, or null if no thread has that reply.
Returns items that match the filter criteria.
If no filter criteria is provided, all items will be returned.
Optionaloptions: ICommentCollection.GetItemsOptions
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 the items as a fresh array, in iteration order.
Holds comments — a sheet's, or every sheet's in the workbook.