PDF、Word 与幻灯片32k · #9187
gws-sheets
它能做什么
这个工具可以帮你操作 Google Sheets。你可以读取表格数据、添加新行,甚至创建一个新的电子表格。
适用场景
- ✓当你需要向列表中添加新信息时。
- ✓当你想从表格中提取特定数据时。
- ✓当你需要创建一条新的数据记录时。
技能链接
https://github.com/googleworkspace/cli/blob/main/skills/gws-sheets/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
请用这个技能帮我:https://github.com/googleworkspace/cli/blob/main/skills/gws-sheets/SKILL.md
阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
npx skills add googleworkspace/cli --skill gws-sheets
下载 SKILL.md,放进智能体的技能文件夹。
curl -L https://raw.githubusercontent.com/googleworkspace/cli/main/skills/gws-sheets/SKILL.md -o SKILL.md
可以这样问 AI
“把 “Apple”“Red”“Sweet” 这一行添加到我的水果列表里。”
每周 5 个新技能,1 分钟读完。
工作原理
工具会连接 Google Sheets 来执行操作。你告诉它要做什么(读取、写入、添加)以及对应的电子表格,它就会去执行。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
sheets (v4)
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto create it.
gws sheets <resource> <method> [flags]
Helper Commands
| Command | Description |
|---|---|
+append |
Append a row to a spreadsheet |
+read |
Read values from a spreadsheet |
API Resources
spreadsheets
batchUpdate— Applies one or more updates to the spreadsheet. Each request is validated before being applied. If any request is not valid then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. The replies will mirror the requests. For example, if you applied 4 updates and the 3rd one had a reply, then the response will have 2 empty replies, the actual reply, and another empty reply, in that order.create— Creates a spreadsheet, returning the newly created spreadsheet.get— Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. By default, data within grids is not returned. You can include grid data in one of 2 ways: * Specify a field mask listing your desired fields using thefieldsURL parameter in HTTP * Set the includeGridData URL parameter to true.getByDataFilter— Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. For more information, see Read, write, and search metadata. This method differs from GetSpreadsheet in that it allows selecting which subsets of spreadsheet data to return by specifying a dataFilters parameter. Multiple DataFilters can be specified.developerMetadata— Operations on the 'developerMetadata' resourcesheets— Operations on the 'sheets' resourcevalues— Operations on the 'values' resource
Discovering Commands
Before calling any API method, inspect it:
# Browse resources and methods
gws sheets --help
# Inspect a method's required params, types, and defaults
gws schema sheets.<resource>.<method>
Use gws schema output to build your --params and --json flags.
常见问题
我需要 Google 账号吗?
需要。要访问和修改你的 Google Sheets,你必须登录自己的 Google 账号。
AI 怎么知道该用哪个电子表格?
你需要在请求中指明电子表格的名称或 ID。如果不确定,可以让 AI 列出你的电子表格。
可以从零开始创建电子表格吗?
可以。这个工具支持创建新的电子表格。
详情
热度
- GitHub 星标
- 32k
- 排名
- #9187
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/6
评论
- …