跳到主要内容

GetFullName

返回当前打开文件的完整名称。

语法

expression.GetFullName();

expression - 表示 Api 类的变量。

参数

此方法没有任何参数。

返回值

string

示例

此示例演示如何获取当前打开文件的完整名称。

// How to get a full name of the file.

// Insert a full name of the file into a cell.

let worksheet = Api.GetActiveSheet();
let name = Api.GetFullName();
worksheet.GetRange("B1").SetValue("File name: " + name);