WPS 基础接口 > 表格 API 参考 > Application > 属性 > Application.RegisteredFunctions 属性
返回在动态链接库或代码资源中的用 REGISTER 或 REGISTER.ID 宏函数登记的函数信息。Variant 类型,只读。

语法

表达式.RegisteredFunctions(Index1, Index2)

表达式   一个代表 Application 对象的变量。

参数

名称 必选/可选 数据类型 说明
Index1 可选 Variant 动态链接库或代码资源的名称。
Index2 可选 Variant 函数的名称。

说明

如果未指定索引参数,则本属性返回包含所有已登记函数列表的数组。数组中的每一行包含一个函数的信息,如下表所示。

内容
1 动态链接库或代码资源的名称
2 动态链接库或代码资源中过程的名称
3 指明返回值的数据类型和参数数目及数据类型的字符串。

没有注册的函数时,该属性返回 null

示例

本示例创建已登记的函数的列表,并在 Sheet1 中每一行放置一个已登记函数。A 列包含动态链接库或代码资源的完整路径和名称,B 列包含函数名称,C 列包含参数数据类型代码。

示例代码
theArray = Application.RegisteredFunctions
If IsNull(theArray) Then
    MsgBox "No registered functions"
Else
    For i = LBound(theArray) To UBound(theArray)
        For j = 1 To 3
            Worksheets("Sheet1").Cells(i, j). _
                Formula = theArray(i, j)
        Next j
    Next i
End If


let theArray = Application.RegisteredFunctions

if(theArray.length == 0){
    MsgBox("No registered functions")
}
else{
    for(let i = 0; i < theArray.length; i++){
        for(let j = 1; i %lt;= 3; j++){
            Worksheets.Item("Sheet1").Cells(i, j).Formula = theArray(i, j)
        }
    }
}

Registered Functions Property


请参阅