formula-operations
公式运算规范 — .Formula 写入、常用公式模板、纠错方法、WPS 特有限制
Skill by claude-office-skills
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/claude-office-skills-formula-operations
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/formula-operations
What's inside
- Skill name
formula-operations- Description
- 公式运算规范 — .Formula 写入、常用公式模板、纠错方法、WPS 特有限制
- License
- MIT
- Instructions
- 67 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
## 公式写入规范
### 核心原则:用 .Formula 写公式,不用 .Value2 写计算结果
```javascript
// ✅ 正确:写入公式,Excel 自动计算
ws.Range("D2").Formula = "=B2*C2";
ws.Range("D20").Formula = "=SUM(D2:D19)";
// ❌ 错误:用 JS 算好再写入值(用户无法调参)
ws.Range("D2").Value2 = b2 * c2;
```
### 公式拖填(批量写入)
```javascript
// 方法1: 逐行写入(最可靠)
for (var r = 2; r <= lastRow; r++) {
ws.Range("D" + r).Formula = "=B" + r + "*C" + r;
}
// 方法2: 首行写入 + AutoFill
ws.Range("D2").Formula = "=B2*C2";
ws.Range("D2").AutoFill(ws.Range("D2:D" + lastRow));
```
### 常用公式模板
| 场景 | 公式 |
|------|------|
| 求和 | `=SUM(B2:B100)` |
| 条件求和 | `=SUMIF(A2:A100,"条件",B2:B100)` |
| 多条件求和 | `=SUMIFS(C2:C100,A2:A100,"条件1",B2:B100,">0")` |
| 计数 | `=COUNTA(A2:A100)` |
| 条件计数 | `=COUNTIF(A2:A100,"条件")` |
| 平均值 | `=AVERAGE(B2:B100)` |
| 查找匹配 | `=VLOOKUP(查找值,表区域,列号,0)` |
| 灵活查找 | `=INDEX(返回区域,MATCH(查找值,查找区域,0))` |
| 条件判断 | `=IF(条件,"是","否")` |
| 嵌套判断 | `=IF(A2>90,"优",IF(A2>60,"及格","不及格"))` |
| 百分比 | `=B2/SUM(B$2:B$100)` |
| 环比增长 | `=(B3-B2)/B2` |
| 排名 | `=RANK(B2,B$2:B$100)` |
| 文本拼接 | `=A2&"-"&B2` |
### 公式纠错方法
```javascript
// 读取公式内容(不是值)
var formula = ws.Range("D2").Formula;
// 常见错误及修复思路
// #VALUE! → 数据类型不匹配,检查是否文本混在数字中
// #REF! → 引用了被删除的单元格
// #NAME? → 函数名拼写错误或不存在
// #DIV/0! → 除数为零,用 =IF(B2=0,0,A2/B2)
// #N/A → VLOOKUP 找不到值,用 =IFERROR(VLOOKUP(...),"未找到")
```
### WPS 特有注意事项
- WPS 中 `.FormulaR1C1` 可能不稳定,优先用 `.Formula`(A1 格式)
- 数组公式 `{=...}` 在 WPS 加载项中支持有限,优先用辅助列拆解
- 跨工作表引用格式:`='表名'!A1`
- 公式中的中文引号会导致错误,确保用英文双引号From claude-office-skills/claude-office-plugin, MIT.
More from claude-office-skills/claude-office-plugin
- 0.466score
equity-valuation-framework
claude-office-skills
Provides a decision-grade equity valuation playbook and report standard (multiples, DCF, quality assessment, scenarios, margin of safety); used when users…
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
local-access
claude-office-skills
macOS 本地计算机操作 — 日历、通讯录、邮件、提醒、Finder、剪贴板、浏览器、应用控制
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
sandbox-executor
claude-office-skills
沙盒执行器 — 在安全隔离环境中运行 Python/Shell 脚本获取外部数据
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
wps-core-api
claude-office-skills
WPS ET API 核心参考 — 全局变量、Range 读写、格式化、工作表操作、禁用 API
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
financial-data
claude-office-skills
金融数据连接器 — 通过 Data Bridge 获取实时股票、财务报表、估值比率等结构化数据
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
sensortower
claude-office-skills
SensorTower 移动应用数据连接器 — App 下载量、收入、DAU/MAU 数据
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
chart-creation
claude-office-skills
WPS 图表创建 — AddChart2 方法、图表类型、配色方案、最佳实践
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
code-rules
claude-office-skills
WPS 代码生成规则 — 单块规则、禁止拆分、数据保护、新建工作表模式
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
data-analysis
claude-office-skills
数据解读与分析 — 统计方法、趋势分析、透视汇总、结论输出规范
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
data-cleaning
claude-office-skills
数据清洗最佳实践 — 空值处理、去重、格式统一、异常值检测、分列操作
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
financial-modeling
claude-office-skills
投行级金融建模引擎 — 公式驱动的多Sheet专业DCF/估值模型
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
equity-valuation
claude-office-skills
股票估值报告引擎 — 数据质量门控/多方法估值/质量评估/风险矩阵/决策框架的 Excel 完整估值工作簿
SkillDFreshness: D★ 9Claude Code +9
Signals
- Stars
- 9
- Forks
- 3
- Open issues
- 0
- Last commit (this folder)
- Feb 26, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from claude-office-skills
- 0.549score
amazon-seller
claude-office-skills
Trigger: amazon-seller, Automate Amazon seller operations including inventory, orders, pricing, and advertising management.
SkillBFreshness: B★ 1Claude Code +9 - 0.466score
equity-valuation-framework
claude-office-skills
Provides a decision-grade equity valuation playbook and report standard (multiples, DCF, quality assessment, scenarios, margin of safety); used when users…
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
sandbox-executor
claude-office-skills
沙盒执行器 — 在安全隔离环境中运行 Python/Shell 脚本获取外部数据
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
financial-data
claude-office-skills
金融数据连接器 — 通过 Data Bridge 获取实时股票、财务报表、估值比率等结构化数据
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
sensortower
claude-office-skills
SensorTower 移动应用数据连接器 — App 下载量、收入、DAU/MAU 数据
SkillDFreshness: D★ 9Claude Code +9 - 0.464score
wps-core-api
claude-office-skills
WPS ET API 核心参考 — 全局变量、Range 读写、格式化、工作表操作、禁用 API
SkillDFreshness: D★ 9Claude Code +9
Cite this page
formula-operations skill. Agent Mart. https://agentmart.dev/skills/claude-office-skills-formula-operations (last updated 2026-10-24)