spreadsheet-operations

spreadsheet-operations is a skill for Claude Code, Codex from apexcheng/yingdao-xbot-ai-agent. It costs 39 tokens per session (942 once invoked), scanned A, original, MIT.

A fixed procedure for using WPS Office to read and update Excel and CSV files through Python code. It covers opening workbooks, changing sheets, saving, and closing them.

In plain words
What is it for?
Use it when building programs that download, read, calculate, update, and save Excel or CSV workbooks in WPS.
Why use it?
It avoids inconsistent spreadsheet handling and prevents use of unsupported loading or saving methods.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when building programs that download, read, calculate, update, and save Excel or CSV workbooks in WPS.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/apexcheng/yingdao-xbot-ai-agent/spreadsheet-operations
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add apexcheng/yingdao-xbot-ai-agent --skill spreadsheet-operations
Clone the repo
git clone --depth 1 https://github.com/apexcheng/yingdao-xbot-ai-agent

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for spreadsheet-operations

README.md
[![agentmods](https://agentmods.dev/badge/skills/apexcheng/yingdao-xbot-ai-agent/spreadsheet-operations/github.svg)](https://agentmods.dev/skills/apexcheng/yingdao-xbot-ai-agent/spreadsheet-operations)
Your own site
<a href="https://agentmods.dev/skills/apexcheng/yingdao-xbot-ai-agent/spreadsheet-operations"><img src="https://agentmods.dev/badge/skills/apexcheng/yingdao-xbot-ai-agent/spreadsheet-operations/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for spreadsheet-operations

Your own site · 80×15
<a href="https://agentmods.dev/skills/apexcheng/yingdao-xbot-ai-agent/spreadsheet-operations"><img src="https://agentmods.dev/badge/skills/apexcheng/yingdao-xbot-ai-agent/spreadsheet-operations.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 942 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.00942
Opus 5.5 $0.00016 $0.00377
Sonnet 5.5 $0.00008 $0.00188
Haiku 4.5 $0.00004 $0.00094

Measured 2d ago against content hash 24398b0b6d2c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

spreadsheet-operations scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

project-template/.agents/skills/spreadsheet-operations/SKILL.md · 36 lines

What it actually says

表格操作(影刀 WPS)

开发影刀表格更新程序时遵守本页。API 参数和返回值查 xbot.excel 正式文档;业务模块命名与函数边界见 编程风格。不重复加载其它表格操作规范。

打开与使用工作簿

  1. 本轮程序第一次打开 WPS 前,直接调用 xbot.excel.kill_excel_process("wps", True) 结束残留进程;不判断其他 WPS 文件是否正在编辑。本轮已经打开目标工作簿后,不在打开源文件前再次结束 WPS。

  2. 所有表格文件,包括 Excel 和 CSV,都使用 xbot.excel.open() 的 WPS 驱动打开,不改用 openpyxl、pandas 或其它方式加载。

  3. 统一使用 workbook = xbot.excel.open(file_name=str(target), kind="wps", visible=True, update_links=False);不使用 visible=False。

  4. 每次打开工作簿后,立即激活并最大化:

    workbook.workbook.Activate()
    workbook.workbook.Application.WindowState = -4137
    
  5. 每个 Sheet 的数据源更新使用 get_range() 读取 → 按需清洗或计算 → set_range() 写入。已有二维数据直接 set_range(),不创建临时工作簿中转。 覆盖旧数据时只清空当前业务约定的数据区域,不整表 clear() 影响公式和格式。写入原始数据后确实要立即使用公式计算结果时,按实际 WPS 计算结果处理,不能用 Python 模拟计算代替。

  6. 表格下载后不验证表头、第一行是否有数据或文件是否存在;需要什么数据就直接按业务流程读取处理。

  7. 表格处理函数直接接收已经打开的 workbook;禁止 load_excel_matrix 及同类再次加载工作簿的封装。多个函数需要同一对象时由主流程局部变量持有、传递。

多 Sheet 更新与收尾

  1. 主流程直接写明下载、打开、写入、计算、保存和关闭的先后顺序。目标工作簿一轮只打开一次,各业务模块接收该对象。
  2. 每个 Sheet 的完整更新流程最多尝试 2 次(首次执行 + 失败后重试 1 次),包括下载、读取和写入,不仅重试下载;不把整轮保存和通知纳入该重试。A Sheet 最终失败时记录错误,继续更新独立的 C Sheet;存在前置依赖的 Sheet 按当前业务确认的依赖关系及失败策略处理。各 Sheet 处理完后统一 workbook.save() 一次,不在每个 Sheet 更新后保存。
  3. 下载函数供后续步骤直接处理表格时,返回已经打开的源 workbook,由主流程持有并传递;如果另一个业务需要复用前一个业务下载的文件,则前一个业务返回 filepath,后一个业务接收该路径。不重复下载或重新加载已打开的工作簿。
  4. 完成本轮处理后,先保存目标工作簿,再统一关闭全部 WPS 表格,不额外维护逐工作簿关闭清单。异常时按原业务异常处理未保存内容;清理失败不能覆盖原来的业务异常。
  5. 表格更新业务各自放在 update_xxx.py 中,例如 update_erp_date.py 和 update_sales.py。同一业务的下载和更新放在一起,不因读取 C-ERP 数据就把其它业务的函数放入 C-ERP 模块;多个业务确实复用相同且完整的技术操作时才提取公共函数。

不为了潜在需求新增跨轮下载缓存、重复状态源、补跑开关、历史兼容和复杂恢复分支。

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago Changed 24398b0b6d2c
  2. 3d ago First seen · 36 lines · 39 tokens per session scan A 2dabd0a90b70

Subscribe to this mod's changes

spreadsheet-operations is a skill published in the GitHub repository apexcheng/yingdao-xbot-ai-agent (37 stars, last pushed today), licensed MIT. It adds 39 tokens to every session and 942 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-15.