Skip to main content
Glama
lubo3395
by lubo3395

更新 Excel 单元格

xlsx_update_cells
Destructive

Update cell values in a given sheet of an xlsx file. Specify file path, sheet name or index, and a JSON object mapping cell references to new values.

Instructions

更新 xlsx 文件中指定 sheet 的单元格值。

参数:

  • file_path (string, 必填): xlsx 文件路径

  • sheet (string|number, 必填): sheet 名称或索引 (从 0 开始)

  • cells (string, 必填): 要更新的单元格,JSON 对象格式: {"A1": "值", "B2": 123, "C3": true}

返回:

  • file_path: 文件路径

  • sheet: 更新的 sheet

  • updated: 更新单元格数量

示例:

  • "把 test.xlsx 的 Sheet1 中 A1 改成 Hello" -> { file_path: "test.xlsx", sheet: "Sheet1", cells: '{"A1": "Hello"}' }

  • "批量修改多个单元格" -> { file_path: "test.xlsx", sheet: 0, cells: '{"A1": "标题", "B1": "值"}' }

错误处理:

  • cells 格式无效: "cells 格式无效: ..."

  • 单元格引用无效: "单元格引用无效: ..."

  • sheet 不存在: "Sheet ... 不存在"

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYesxlsx 文件路径
sheetYessheet 名称或索引 (从 0 开始)
cellsYes要更新的单元格, JSON 对象格式: {"A1": "值", "B2": 123}

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lubo3395/mcp-xlsx-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server