Skip to main content
Glama
lubo3395
by lubo3395

添加 Sheet 到 Excel

xlsx_add_sheet
Destructive

Add a new sheet to an existing xlsx file by providing the file path, JSON data, and a unique sheet name.

Instructions

向已有的 xlsx 文件中添加新的 sheet。

参数:

  • file_path (string, 必填): 已存在的 xlsx 文件路径

  • data (string, 必填): JSON 数据字符串 (同 xlsx_create 的 data 参数)

  • sheet_name (string, 必填): 新 sheet 名称 (不能与已有 sheet 重名)

返回:

  • file_path: 文件路径

  • sheet_name: 新 sheet 名称

  • rows: 数据行数

  • cols: 数据列数

  • sheets: 更新后的所有 sheet 名称列表

示例:

  • "往 test.xlsx 添加一个名为 成绩表 的 sheet" -> { file_path: "test.xlsx", data: '[{"姓名":"张三","成绩":90}]', sheet_name: "成绩表" }

错误处理:

  • Sheet 名称已存在: "Sheet "名称" 已存在。可用 ..."

  • 文件不存在: "文件不存在: ..."

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes已存在的 xlsx 文件路径
dataYesJSON 数据: 可以是对象数组或二维数组
sheet_nameYes新 sheet 名称 (不能与已有 sheet 重名)

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