wps_et_run_macro
Execute an existing VBA macro in the current WPS spreadsheet by providing the macro name and optional parameters.
Instructions
调用当前工作簿里已存在的宏(VBA Sub/Function)。注意:本工具只能调用用户事先在 WPS 里编写并保存好的宏,不能写入新宏代码(写宏需要"信任访问 VBA 工程对象模型"权限,JS 加载项拿不到,属于设计上的限制而非未实现)。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>"
},
"name": "wps_et_run_macro"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | 传给宏的参数(可选) | |
| name | Yes | 宏名称,如 "Module1.MySub" |