首页/产品经理/wecomcli-manage-smartsheet-data
W

wecomcli-manage-smartsheet-data

by @wecomteamv1.0.0
4.1(10)

管理企业微信智能表格中的行数据记录,支持增删改查,可通过文档ID或URL定位目标表格进行数据操作

productivity-toolsautomationspreadsheet-automationdata-extractionGitHub
安装方式
npx skills add wecomteam/wecom-cli --skill wecomcli-manage-smartsheet-data
compare_arrows

Before / After 效果对比

1
使用前

手动打开智能表格、定位到目标行、复制或修改数据、保存并关闭,处理100条数据需要1小时,容易出错且无法批量操作

使用后

通过命令行直接操作表格数据,支持批量读取、插入、更新、删除记录,可编程实现复杂逻辑,处理100条数据仅需5分钟

description SKILL.md

wecomcli-manage-smartsheet-data

企业微信智能表格数据管理

wecom-cli 是企业微信提供的命令行程序,所有操作通过执行 wecom-cli 命令完成。

管理智能表格中的记录(行数据)。所有接口支持通过 docidurl 二选一定位文档。

CLI 调用方式

通过 wecom-cli 调用,品类为 doc

wecom-cli doc <tool_name> '<json_params>'

返回格式说明

所有接口返回 JSON 对象,包含以下公共字段:

字段 类型 说明

errcode integer 返回码,0 表示成功,非 0 表示失败

errmsg string 错误信息,成功时为 "ok"

errcode 不为 0 时,说明接口调用失败,可重试 1 次;若仍失败,将 errcodeerrmsg 展示给用户。

smartsheet_get_records

查询子表全部记录。

wecom-cli doc smartsheet_get_records '{"docid": "DOCID", "sheet_id": "SHEETID"}'

  • 或通过 URL:
wecom-cli doc smartsheet_get_records '{"url": "https://doc.weixin.qq.com/smartsheet/xxx", "sheet_id": "SHEETID"}'

参见 API 详情

smartsheet_add_records

添加一行或多行记录,单次建议 500 行内。

调用前必须先了解目标表的字段类型(通过 smartsheet_get_fields)。

wecom-cli doc smartsheet_add_records '{"docid": "DOCID", "sheet_id": "SHEETID", "records": [{"values": {"任务名称": [{"type": "text", "text": "完成需求文档"}], "优先级": [{"text": "高"}]}}]}'

各字段类型的值格式参见 单元格值格式参考

smartsheet_update_records

更新一行或多行记录,单次必须在 500 行内。需提供 record_id(通过 smartsheet_get_records 获取)。

wecom-cli doc smartsheet_update_records '{"docid": "DOCID", "sheet_id": "SHEETID", "key_type": "CELL_VALUE_KEY_TYPE_FIELD_ID", "records": [{"record_id": "RECORDID", "values": {"FIELDID": [{"type": "text", "text": "更新后的内容"}]}}]}'

注意:创建时间、最后编辑时间、创建人、最后编辑人字段不可更新。

smartsheet_delete_records

删除一行或多行记录,单次必须在 500 行内。操作不可逆。record_id 通过 smartsheet_get_records 获取。

wecom-cli doc smartsheet_delete_records '{"docid": "DOCID", "sheet_id": "SHEETID", "record_ids": ["RECORDID1", "RECORDID2"]}'

典型工作流

  • 读取数据
wecom-cli doc smartsheet_get_records '{"docid":"DOCID","sheet_id":"SHEETID"}'

  • 写入数据 → 先 smartsheet_get_fields 了解列类型 → 若涉及成员(USER)字段,先通过 wecomcli-lookup-contactget_userlist 查找人员 userid → smartsheet_add_records 写入

  • 更新数据 → 先 smartsheet_get_records 获取 record_id → 若涉及成员(USER)字段,先通过 wecomcli-lookup-contactget_userlist 查找人员 userid → smartsheet_update_records 更新

  • 删除数据 → 先 smartsheet_get_records 确认 record_id → smartsheet_delete_records 删除

注意:成员(USER)类型字段需要填写 user_id,不能直接使用姓名。必须先通过 wecomcli-lookup-contact 技能的 get_userlist 接口按姓名查找到对应的 userid 后再使用。

Weekly Installs1.1KRepositorywecomteam/wecom-cliGitHub Stars887First Seen1 day agoSecurity AuditsGen Agent Trust HubPassSocketPassSnykPassInstalled ongemini-cli1.1Kcursor1.1Kcodex1.1Kopencode1.1Kgithub-copilot1.1Kantigravity1.1K

forum用户评价 (0)

发表评价

效果
易用性
文档
兼容性

暂无评价,来写第一条吧

统计数据

安装量455
评分4.1 / 5.0
版本1.0.0
更新日期2026年3月31日
对比案例1 组

用户评分

4.1(10)
5
0%
4
0%
3
0%
2
0%
1
0%

为此 Skill 评分

0.0

兼容平台

🔧Claude Code

时间线

创建2026年3月31日
最后更新2026年3月31日