GetId
Returns the ID of the custom XML part.
Syntax
expression.GetId();
expression - A variable that represents a ApiCustomXmlPart class.
Parameters
This method doesn't have any parameters.
Returns
string
Example
This example shows how to get the ID of a custom XML part.
- Code
- Result
// How to get the ID of an XML part.
// Get an XML part ID.
let worksheet = Api.GetActiveSheet();
let xmlManager = worksheet.GetCustomXmlParts();
let xml = xmlManager.Add("<settings><theme>dark</theme></settings>");
let id = xml.GetId();
worksheet.GetRange("A1").SetValue("XML part ID: " + id);