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.
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 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 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 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.
Returns the style with the given name, or null if there is none.
The name, compared case-insensitively.
Returns the style a table is given when it is created without one.
Returns the styles that match the filter, in gallery order.
Optionaloptions: ITableStyleCollection.GetItemsOptions
Returns the style of a table that has none: it applies nothing, and is never in the list.
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 result of calling the function on every item, in iteration order.
Called once per item.
Adds or updates a style.
The name, compared case-insensitively. Setting a built-in's name customizes the built-in.
The style's values.
The style as stored.
Sets the style a table is given when it is created without one.
The style, or its name. A name that matches nothing leaves the default at
TableStyleMedium2, the built-in default.
The previous default.
Returns true if the predicate accepts at least one item.
Called once per item in iteration order until it returns true.
Returns the items as a fresh array, in iteration order.
The table styles of a workbook — the built-ins (
TableStyleMedium2, ...) and the ones the document defines — and which of them is the default for a new table.Remarks
Office Scripts has the same shape:
Workbook.getTableStyles(),getTableStyle(name),getDefaultTableStyle()/setDefaultTableStyle(style); its pivot table styles are the members here that are shown for pivots (getItems({ shownIn: 'pivot' })).Order is the gallery's: the built-ins in their definition order, each replaced in place by a custom style of the same name, then the document's own styles by name.
onCollectionChangeannounces a style added, changed or deleted, and a change of the default.Reached from IStyleCollection.getTableStyles.