Files
playbook/skills/tsl-api-reference/references/codegen/dotnet/document/excel.md
T
csh 13be5ea0aa feat(tsl-api-reference): index class and unit APIs
Migrate reference pages to declaration-line storage and rebuild the
13-column index.

Add qualified member lookup plus regression and end-to-end coverage.
2026-07-29 15:47:46 +08:00

1.2 KiB
Raw Blame History

Builtin - 文档 / Excel

excelGetApplication()

声明:function

获得当前操作Excel操作函数打开的Excel应用程序的对象。

返回:comobj

excelClose(file_name)

声明:function

关闭Excel文件。注意:将打开的文件关闭后,就可以进行手动打开修改数据,相当于程序解锁。

参数 类型 说明
file_name string 字符串类型。Excel文件名称

返回:bool

示例

// 关闭本地文件:C:\VBA.xls
ret := rdo2 excelOpen("C:\\VBA.xls");
if ret then
ret1 := rdo2 excelClose("C:\\VBA.xls");
return ret1;
// 输出:1

excelQuit()

声明:function

退出Excel文件进程。注意:会同时关闭所有被打开的excel文件。

返回:bool

示例

// 关闭本地文件:C:\VBA1.xlsC:\VBA2.xls
ret := rdo2 excelOpen("C:\\VBA1.xls");
ret1 := rdo2 excelOpen("C:\\VBA2.xls");
if ret and ret1 then
ret2 := rdo2 excelQuit();
return ret2;
// 输出:1

xlColumns()

声明:function

Chart的数据源由列分割。

返回:integer

xlRows()

声明:function

Chart的数据源由行分割。

返回:integer