跳到主要内容

GetClassType

返回 ApiCustomXmlPart 类的类型。

语法

expression.GetClassType();

expression - 表示 ApiCustomXmlPart 类的变量。

参数

此方法没有任何参数。

返回值

"customXmlPart"

示例

获取电子表格中自定义 XML 部件的类类型。

// How to identify the class type of a custom XML part in a spreadsheet?

// Obtain the class type identifier of a custom XML part object in a spreadsheet.

let worksheet = Api.GetActiveSheet();
let xmlManager = worksheet.GetCustomXmlParts();
let xml = xmlManager.Add("<data><value>Sample</value></data>");
let classType = xml.GetClassType();
worksheet.GetRange("A1").SetValue("Class type: " + classType);