Many classes have collections of items, where each item has a key (typically an ID or a name). Examples include a collection of sheets keyed by name or the list of parameters on a sheet keyed by name. Collections are publicly immutable, exposing read-only functionality. Each Collection array is keyed with its elements' identifiers. For example, the result of Workbook.getPublishedSheetsInfo() is an array with the index corresponding to the position of the sheet in the workbook.

var sheet = workbook.getPublishedSheetsInfo()[0];

It is also keyed by the sheet name so that you can access it like this:

var sameSheet = workbook.getPublishedSheetsInfo().get("Sheet 1");

Collection Interface


Return Type Description

get(key : string)

Collection item type

Gets the element in the collection associated with the key, or undefined if there is nothing associated with it.

has(key : string)


Returns true if there is an element in the collection associated with the key; otherwise, false.

Thanks for your feedback!Your feedback has been successfully submitted. Thank you!