excel_write_cell
文档 · macOS · Windows
效果: 写入. 状态: 受限可用.
“受限可用”表示工具可能取决于版本、平台、权限、账户或配置,并不表示它在所有安装中都已启用。
macOS
用途
向 Excel 文件中的指定单元格写入值。看起来是数字的值字符串,只有在能够完全无损往返时才会作为数字写入;否则保持为文本。以 `=` 开头的值会作为公式写入(例如 "=SUM(B2:B3)"),在文件打开时计算;以撇号开头可将其保留为文本。访问文件之外或运行代码的公式(WEBSERVICE、IMAGE、HYPERLINK、STOCKHISTORY、TRANSLATE、COPILOT、PY、CUBE…、CALL、REGISTER、EXEC、IMPORT…、RTD、DDE 或 `|`,或按名称、路径或 URL 引用另一个工作簿,包括在 INDIRECT 或 ADDRESS 内以文本形式构造的引用)会被拒绝,且不会写入任何内容。可用 A1 记法的 `cell`(例如 "B2"),或用以 1 为起点的整数 `row`+`column` 指定单元格。
必填输入
pathvalue
输入名称会严格保持工具要求的形式。下方可展开的架构中保留英文规范技术定义。
权限与确认
架构声明了明确的确认参数。请检查预览,并按此平台的契约授权实际操作。
- 仅使用用户在此平台上授权的应用、账户和资源。请查阅此工具针对平台的说明,以了解其连接和权限要求;本目录不声称需要额外的 OAuth 范围或操作系统授权。
英文规范技术架构 — macOS
{
"properties": {
"cell": {
"description": "Cell in A1 notation, e.g. \"B2\" (alternative to row+column)",
"type": "string"
},
"column": {
"description": "Column number (1-based) — use with `row`, or use `cell` instead",
"type": "integer"
},
"confirm": {
"description": "Must be true to modify",
"type": "boolean"
},
"path": {
"description": "Path to the .xlsx file",
"type": "string"
},
"row": {
"description": "Row number (1-based) — use with `column`, or use `cell` instead",
"type": "integer"
},
"sheet_name": {
"description": "Sheet name (default: first sheet). Matched without case. A name that no sheet has is an error listing the available ones — it never falls back to the first sheet.",
"type": "string"
},
"value": {
"description": "Value to write",
"type": "string"
}
},
"required": [
"path",
"value"
],
"type": "object"
}文档示例
excel_write_cell 的文档示例。请勿执行此示例。所示参数属于虚构数据集;在实际调用前,请解析真实标识符并获得授权。
{
"cell": "B2",
"confirm": false,
"path": "/Users/demo/Documents/launch-checklist.xlsx",
"value": "Reviewed"
}Windows
用途
向现有 Excel 文件中的特定单元格写入值。
必填输入
pathvalue
输入名称会严格保持工具要求的形式。下方可展开的架构中保留英文规范技术定义。
权限与确认
架构声明了明确的确认参数。请检查预览,并按此平台的契约授权实际操作。
- 仅使用用户在此平台上授权的应用、账户和资源。请查阅此工具针对平台的说明,以了解其连接和权限要求;本目录不声称需要额外的 OAuth 范围或操作系统授权。
英文规范技术架构 — Windows
{
"properties": {
"cell": {
"description": "Cell reference (e.g., B2) — alternative to row+column",
"type": "string"
},
"column": {
"description": "Column number (1-based) — use with `row`, alias for `cell`. The name the cloud catalog (Mac) advertises.",
"type": "integer"
},
"confirm": {
"description": "Must be true to write",
"type": "boolean"
},
"path": {
"description": "Path to .xlsx file",
"type": "string"
},
"row": {
"description": "Row number (1-based) — use with `column`, alias for `cell`",
"type": "integer"
},
"sheet_name": {
"description": "Name of the sheet to write to (default: first sheet). The name the cloud catalog (Mac) advertises.",
"type": "string"
},
"value": {
"description": "Value to write",
"type": "string"
}
},
"required": [
"path",
"value"
],
"type": "object"
}文档示例
excel_write_cell 的文档示例。请勿执行此示例。所示参数属于虚构数据集;在实际调用前,请解析真实标识符并获得授权。
{
"cell": "B2",
"confirm": false,
"path": "C:\\Users\\demo\\Documents\\launch-checklist.xlsx",
"value": "Reviewed"
}