What's new in Excel JavaScript API 1.5

ExcelApi 1.5 adds Custom XML parts. These are accessible through the custom XML parts collection in the workbook object.

Custom XML part

  • Get custom XML parts using their ID.
  • Get a new scoped collection of custom XML parts whose namespaces match the given namespace.
  • Get an XML string associated with a part.
  • Provide the ID and namespace of a part.
  • Add a new custom XML part to the workbook.
  • Set an entire XML part.
  • Delete a custom XML part.
  • Delete an attribute with the given name from the element identified by xpath.
  • Query the XML content by xpath.
  • Insert, update, and delete attributes.

API list

The following table lists the APIs in Excel JavaScript API requirement set 1.5. To view API reference documentation for all APIs supported by Excel JavaScript API requirement set 1.5 or earlier, see Excel APIs in requirement set 1.5 or earlier.

Class Fields Description
CustomXmlPart delete() Deletes the custom XML part.
getXml() Gets the custom XML part's full XML content.
id The custom XML part's ID.
namespaceUri The custom XML part's namespace URI.
setXml(xml: string) Sets the custom XML part's full XML content.
CustomXmlPartCollection add(xml: string) Adds a new custom XML part to the workbook.
getByNamespace(namespaceUri: string) Gets a new scoped collection of custom XML parts whose namespaces match the given namespace.
getCount() Gets the number of custom XML parts in the collection.
getItem(id: string) Gets a custom XML part based on its ID.
getItemOrNullObject(id: string) Gets a custom XML part based on its ID.
items Gets the loaded child items in this collection.
CustomXmlPartScopedCollection getCount() Gets the number of CustomXML parts in this collection.
getItem(id: string) Gets a custom XML part based on its ID.
getItemOrNullObject(id: string) Gets a custom XML part based on its ID.
getOnlyItem() If the collection contains exactly one item, this method returns it.
getOnlyItemOrNullObject() If the collection contains exactly one item, this method returns it.
items Gets the loaded child items in this collection.
PivotTable id ID of the PivotTable.
RequestContext runtime [Api set: ExcelApi 1.5]
Runtime
Workbook customXmlParts Represents the collection of custom XML parts contained by this workbook.
Worksheet getNext(visibleOnly?: boolean) Gets the worksheet that follows this one.
getNextOrNullObject(visibleOnly?: boolean) Gets the worksheet that follows this one.
getPrevious(visibleOnly?: boolean) Gets the worksheet that precedes this one.
getPreviousOrNullObject(visibleOnly?: boolean) Gets the worksheet that precedes this one.
WorksheetCollection getFirst(visibleOnly?: boolean) Gets the first worksheet in the collection.
getLast(visibleOnly?: boolean) Gets the last worksheet in the collection.

See also