CustomXmlPartScopedCollection Object (JavaScript API for Excel)

A scoped collection of custom XML parts.

Properties

Property Type Description Req. Set
items CustomXmlPartScoped[] A collection of customXmlPartScoped objects. Read-only. 1.5

See property access examples.

Relationships

None

Methods

Method Return Type Description Req. Set
getCount() int Gets the number of CustomXML parts in this collection. 1.5
getItem(id: string) CustomXmlPart Gets a custom XML part based on its ID. 1.5
getItemOrNullObject(id: string) CustomXmlPart Gets a custom XML part based on its ID. 1.5
getOnlyItem() CustomXmlPart If the collection contains exactly one item, this method returns it. 1.5
getOnlyItemOrNullObject() CustomXmlPart If the collection contains exactly one item, this method returns it. 1.5

Method Details

getCount()

Gets the number of CustomXML parts in this collection.

Syntax

customXmlPartScopedCollectionObject.getCount();

Parameters

None

Returns

int

getItem(id: string)

Gets a custom XML part based on its ID.

Syntax

customXmlPartScopedCollectionObject.getItem(id);

Parameters

Parameter Type Description
id string ID of the object to be retrieved.

Returns

CustomXmlPart

getItemOrNullObject(id: string)

Gets a custom XML part based on its ID.

Syntax

customXmlPartScopedCollectionObject.getItemOrNullObject(id);

Parameters

Parameter Type Description
id string ID of the object to be retrieved.

Returns

CustomXmlPart

getOnlyItem()

If the collection contains exactly one item, this method returns it.

Syntax

customXmlPartScopedCollectionObject.getOnlyItem();

Parameters

None

Returns

CustomXmlPart

getOnlyItemOrNullObject()

If the collection contains exactly one item, this method returns it.

Syntax

customXmlPartScopedCollectionObject.getOnlyItemOrNullObject();

Parameters

None

Returns

CustomXmlPart