Files
playbook/docs/tsl/codegen/builtin/document/excel.md
T
csh b6160676b4 ♻️ refactor(tsl): rebuild codegen taxonomy
Move generated builtin and dotnet function docs into the upgraded taxonomy, remove legacy route pages, and regenerate function_index.tsv from markdown headings.
2026-07-07 16:36:08 +08:00

65 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Builtin - 文档 / Excel
## `excelGetApplication()`
获得当前操作Excel操作函数打开的Excel应用程序的对象。
返回:comobj
## `excelClose(file_name)`
关闭Excel文件。注意:将打开的文件关闭后,就可以进行手动打开修改数据,相当于程序解锁。
| 参数 | 类型 | 说明 |
| --- | --- | --- |
| `file_name` | string | 字符串类型。Excel文件名称 |
返回:bool
### 示例
```tsl
// 关闭本地文件:C:\VBA.xls
ret := rdo2 excelOpen("C:\\VBA.xls");
if ret then
ret1 := rdo2 excelClose("C:\\VBA.xls");
return ret1;
// 结果:1
```
## `excelQuit()`
退出Excel文件进程。注意:会同时关闭所有被打开的excel文件。
返回:bool
### 示例
```tsl
// 关闭本地文件: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()`
Chart的数据源由列分割。
返回:integer
## `xlRows()`
Chart的数据源由行分割。
返回:integer
## `isEmpty()`
指定Sheet是否是空Sheet表。
返回:bool