Skip to content

Pinvou/pinvou-agent / pinvou3-app/src-tauri/resources/common/bundle/wecom-skills/wecomcli-sheet

wecomcli-sheet

Verified

何时用:仅当用户明确指向企业微信『在线表格』或提供 doc.weixin.qq.com/sheet/ 链接时使用;泛指做表格默认先按消歧确认,智能表格内容操作走 wecomcli-smartsheet,本地表格默认走本地工具。在线表格:新建、导入 CSV/Excel、读取信息与数据、修改内容、追加行、子表管理;文档公共操作走 wecomcli-doc-manage。

references/sheet-rows-append.md

View on GitHub
# 追加一行数据 — `wecom-cli sheet rows append`

向**在线表格**的指定子工作表末尾自动追加一行数据,无需指定行号——数据将写到最末一行之后。

## 命令

```bash
wecom-cli sheet rows append --json '<JSON 参数>'
```

## 参数

| 字段 | 类型 | 必填 | 默认值 | 语义 |
|---|---|---|---|---|
| `docid` | string | 是 | — | 在线表格 ID |
| `sheet_id` | string | 是 | — | 工作表 ID;通过 `sheet get` 获取 |
| `row` | object | 是 | — | 追加的一行数据 |
| `row.values` | array | 是 | — | 单元格数组,按列顺序排列 |

`row.values[]` 对象结构:

| 子字段 | 类型 | 说明 |
|---|---|---|
| `cell_value` | object | 单元格值,见下方「cell_value 类型选择」|
| `data_type` | string | 与 `cell_value` 对应的数据类型 |
| `cell_format` | object | 单元格样式;传空对象 `{}` 表示默认样式 |

### cell_value 类型选择

| 形态 | 结构 | 适用场景 |
|---|---|---|
| `text` | `{"text": "<纯文本>"}` | 纯文本内容(如姓名、说明、标签、编号字符串等) |
| `number` | `{"number": 123.45}` | 数值,用于金额、数量、比率等需要参与公式计算或聚合的数据;值为 JSON 数字类型,不加引号 |
| `formula` | `{"formula": "=SUM(A1,A2)"}` | 任何以 `=` 开头的公式,包括 `=SUM(...)`、`=A1+B1`、`=IF(...)`、`=VLOOKUP(...)` 等 |
| `link` | `{"link": {"url": "<URL>", "text": "<显示文本>"}}` | 超链接 |

## 返回

| 字段 | 类型 | 说明 |
|---|---|---|
| `row` | object | 写入的行数据,结构与入参 `row` 一致 |

## 使用规则

- **逐行写入场景**:本接口会自动定位到子表最末一行之后追加;批量写不同区域请用 `sheet contents update`。
- **格式与已有内容对齐**:向已有内容的表格追加数据时,新行的样式应尽量与现有表格保持一致,避免出现字体、字号、对齐、边框、底色等风格突兀的行。
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall