SettingCollection Object (JavaScript API for Excel)
Represents a collection of worksheet objects that are part of the workbook.
Properties
| Property | Type | Description | Req. Set |
|---|---|---|---|
| items | Setting[] | A collection of setting objects. Read-only. | 1.4 |
See property access examples.
Relationships
None
Methods
| Method | Return Type | Description | Req. Set |
|---|---|---|---|
| add(key: string, value: (any)[]) | Setting | Sets or adds the specified setting to the workbook. | 1.4 |
| getCount() | int | Gets the number of Settings in the collection. | 1.4 |
| getItem(key: string) | Setting | Gets a Setting entry via the key. | 1.4 |
| getItemOrNullObject(key: string) | Setting | Gets a Setting entry via the key. If the Setting does not exist, will return a null object. | 1.4 |
Method Details
add(key: string, value: (any)[])
Sets or adds the specified setting to the workbook.
Syntax
settingCollectionObject.add(key, value);
Parameters
| Parameter | Type | Description |
|---|---|---|
| key | string | The Key of the new setting. |
| value | (any)[] | The Value for the new setting. |
Returns
getCount()
Gets the number of Settings in the collection.
Syntax
settingCollectionObject.getCount();
Parameters
None
Returns
int
getItem(key: string)
Gets a Setting entry via the key.
Syntax
settingCollectionObject.getItem(key);
Parameters
| Parameter | Type | Description |
|---|---|---|
| key | string | Key of the setting. |
Returns
getItemOrNullObject(key: string)
Gets a Setting entry via the key. If the Setting does not exist, will return a null object.
Syntax
settingCollectionObject.getItemOrNullObject(key);
Parameters
| Parameter | Type | Description |
|---|---|---|
| key | string | The key of the setting. |