写入区域数据
write_rangeWrite a 2D array of values into an Excel sheet starting from a specified cell. Pass null to clear cells; the target sheet must already exist.
Instructions
从 startCell 开始写入一个二维数组(先行后列)。一个格子就传 [[值]];一大片就传多行多列。值为 null 会清空对应单元格。字符串不会被套公式——要写公式请用 set_formula。目标工作表必须已存在(没有就先用 add_sheet)。
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": {
"filePath": "<filePath>",
"sheetName": "<sheetName>",
"startCell": "<startCell>",
"values": "<values>"
},
"name": "write_range"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| values | Yes | 二维数组,每个内层数组是一行。`null` 表示清空该单元格 | |
| filePath | Yes | Excel 文件的绝对路径,例如 `C:\Users\xx\报表.xlsx` 或 `/Users/xx/报表.xlsx`。支持 .xlsx / .xls / .csv | |
| sheetName | Yes | ||
| startCell | Yes | 单元格地址,如 `B5` |