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 styles that match the filter, in gallery order.
Optionaloptions: INamedStyleCollection.GetItemsOptions
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.
Adds or updates a style.
The name, the style, and any of the other IStyle.NamedProperties.
OptionalmergeIfExists: boolean
If true the style is merged over the existing one of that name;
otherwise it replaces it.
The style as stored.
The named cell styles of a workbook — the built-ins (
Normal,Heading 1,Good, ...) and the ones the document defines.Remarks
Office Scripts calls these predefined cell styles (
Workbook.getPredefinedCellStyles()).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. A hidden style is left out unless asked for — see INamedStyleCollection.GetItemsOptions.includeHidden.
Reached from IStyleCollection.getNamedStyles.