微算力 · API 导航与自营网关
API 接入 EN
未登录登录
📗

企业级 Excel 精准处理引擎

Excel XLSX处理 · v1.0.0
这个包缺安装入口,装上也不会生效 缺 SKILL.md 或 frontmatter 不完整(BAD_NAME)。我们仍保留下载,方便你自行查看内容。
办公 安全 S 级 作者 linbo405 公开目录收录
984 下载 0 安装 2.4k 收藏 35 浏览

简介

专业级 Excel/XLSX 文件处理能力,支持公式、日期、样式保真与跨平台兼容,适合财务建模、数据交付与模板维护场景。

原始描述

Create, inspect, and edit Microsoft Excel workbooks and XLSX files with reliable formulas, dates, types, formatting, recalculation, and template preservation...

通过你的 Agent 添加

安装目录:excel-xlsx-53748/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/excel-xlsx-53748/
Codex CLI~/.codex/skills/excel-xlsx-53748/
DeepSeek Harness~/.agents/skills/excel-xlsx-53748/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

本 skill 提供 Microsoft Excel 工作簿的全生命周期处理能力,覆盖创建、检查、编辑三大场景。核心依赖 openpyxl 实现公式、样式、合并单元格、工作表结构等 Excel 原生特性的精准保真,同时支持 pandas 处理分析型 CSV-like 任务。

关键操作规范

  • 日期处理:识别 1900/1904 双日期系统,处理伪闰年 bug,确保序列号与显示格式同步正确
  • 公式工程:写入公式而非硬编码值,使用引用替代魔法数字,验证绝对/相对引用,批量填充前先做抽样测试
  • 类型防护:长 ID、电话号码、前导零字段强制文本存储,规避 15 位精度截断与自动解析陷阱
  • 结构保真:读取现有模板 → 匹配样式 → 回填数据 → 复核冻结窗格/筛选/打印区域/数据验证
  • 交付前校验:检查 #REF!/#DIV/0!/#VALUE!/#NAME?/循环引用,确认缓存值已刷新

显著优点

  1. 专业级保真:原生支持 .xlsx/.xlsm/.xls 全格式,公式、样式、合并单元格、命名区域零丢失
  2. 工程化严谨:针对财务建模场景建立完整规范(假设文档化、可编辑单元格视觉区分、模型可追溯性)
  3. 风险前置:详列 15+ 类常见陷阱(类型推断、列索引偏移、外部引用断裂、跨软件渲染差异等)
  4. 规模适配:提供流式读取、分块处理、显式 dtype 指定等大数据量降级方案

潜在局限

  • 无自动重算:openpyxl 保存后需 Excel 打开触发重算,无法直接输出计算后数值(除非使用第三方计算引擎)
  • 动态数组函数兼容:FILTER/XLOOKUP/SEQUENCE 等新函数在旧版 Excel 中可能降级或报错
  • 宏与 ActiveX:.xlsm 宏代码仅保留不执行,复杂 VBA 工作流需额外处理
  • 内存上限:超大文件(百万行级)仍需流式处理,非全场景透明优化

适合人群

  • 财务分析师、精算师、投资建模人员(需交付可审计 live workbook)
  • 数据工程师处理含公式/样式的企业报表自动化
  • 合规审计场景下需模板结构 100% 保留的数据回填任务

常规风险

  • 静默公式破坏:保存模式误用(值读取模式)会将公式压平为静态值
  • 跨平台渲染差异:Google Sheets/LibreOffice 对日期、条件格式、打印设置存在解释差异
  • 缓存值欺骗:文件显示正常但内含过期计算结果,需强制重算后交付

技能正文


name: Excel / XLSX slug: excel-xlsx version: 1.0.2 homepage: https://clawic.com/skills/excel-xlsx description: "Create, inspect, and edit Microsoft Excel workbooks and XLSX files with reliable formulas, dates, types, formatting, recalculation, and template preservation. Use when (1) the task is about Excel, .xlsx, .xlsm, .xls, .csv, or .tsv; (2) formulas, formatting, workbook structure, or compatibility matter; (3) the file must stay reliable after edits." changelog: Tightened formula anchoring, recalculation, and model traceability after a stricter external spreadsheet audit. metadata: {"clawdbot":{"emoji":"📗","requires":{"bins":[]},"os":["linux","darwin","win32"]}}

When to Use

Use when the main artifact is a Microsoft Excel workbook or spreadsheet file, especially when formulas, dates, formatting, merged cells, workbook structure, or cross-platform behavior matter.

Core Rules

1. Choose the workflow by job, not by habit

  • Use pandas for analysis, reshaping, and CSV-like tasks.
  • Use openpyxl when formulas, styles, sheets, comments, merged cells, or workbook preservation matter.
  • Treat CSV as plain data exchange, not as an Excel feature-complete format.
  • Reading values, preserving a live workbook, and building a model from scratch are different spreadsheet jobs.

2. Dates are serial numbers with legacy quirks

  • Excel stores dates as serial numbers, not real date objects.
  • The 1900 date system includes the false leap-day bug, and some workbooks use the 1904 system.
  • Time is fractional day data, so formatting and conversion both matter.
  • Date correctness is not enough if the number format still displays the wrong thing to the user.

3. Keep calculations in Excel when the workbook should stay live

  • Write formulas into cells instead of hardcoding derived results from Python.
  • Use references to assumption cells instead of magic numbers inside formulas.
  • Cached formula values can be stale, so do not trust them blindly after edits.
  • Check copied formulas for wrong ranges, wrong sheets, and silent off-by-one drift before delivery.
  • Absolute and relative references are part of the logic, so copied formulas can be wrong even when they still "work".
  • Test new formulas on a few representative cells before filling them across a whole block.
  • Verify denominators, named ranges, and precedent cells before shipping formulas that depend on them.
  • A workbook should ship with zero formula errors, not with known #REF!, #DIV/0!, #VALUE!, #NAME?, or circular-reference fallout left for the user to fix.
  • For model-style work, document non-obvious hardcodes, assumptions, or source inputs in comments or nearby notes.

4. Protect data types before Excel mangles them

  • Long identifiers, phone numbers, ZIP codes, and leading-zero values should usually be stored as text.
  • Excel silently truncates numeric precision past 15 digits.
  • Mixed text-number columns need explicit handling on read and on write.
  • Scientific notation, auto-parsed dates, and stripped leading zeros are common corruption, not cosmetic issues.

5. Preserve workbook structure before changing content

  • Existing templates override generic styling advice.
  • Only the top-left cell of a merged range stores the value.
  • Hidden rows, hidden columns, named ranges, and external references can still affect formulas and outputs.
  • Shared strings, defined names, and sheet-level conventions can matter even when the visible cells look simple.
  • Match styles for newly filled cells instead of quietly introducing a new visual system.
  • If the workbook is a template, preserve sheet order, widths, freezes, filters, print settings, validations, and visual conventions unless the task explicitly changes them.
  • Conditional formatting, filters, print areas, and data validation often carry business meaning even when users only mention the numbers.
  • If there is no existing style guide and the file is a model, keep editable inputs visually distinguishable from formulas, but never override an established template to force a generic house style.

6. Recalculate and review before delivery

  • Formula strings alone are not enough if the recipient needs current values.
  • openpyxl preserves formulas but does not calculate them.
  • Verify no #REF!, #DIV/0!, #VALUE!, #NAME?, or circular-reference fallout remains.
  • If layout matters, render or visually review the workbook before calling it finished.
  • Be careful with read modes: opening a workbook for values only and then saving can flatten formulas into static values.
  • If assumptions or hardcoded overrides must stay, make them obvious enough that the next editor can audit the workbook.

7. Scale the workflow to the file size

  • Large workbooks can fail for boring reasons: memory spikes, padded empty rows, and slow full-sheet reads.
  • Use streaming or chunked reads when the file is big enough that loading everything at once becomes fragile.
  • Large-file workflows also need narrower reads, explicit dtypes, and sheet targeting to avoid accidental damage.

Common Traps

  • Type inference on read can leave numbers as text or convert IDs into damaged numeric values.
  • Column indexing varies across tools, so off-by-one mistakes are common in generated formulas.
  • Newlines in cells need wrapping to display correctly.
  • External references break easily when source files move.
  • Password protection in old Excel workflows is not serious security.
  • .xlsm can contain macros, and .xls remains a tighter legacy format.
  • Large files may need streaming reads or more careful memory handling.
  • Google Sheets and LibreOffice can reinterpret dates, formulas, or styling differently from Excel.
  • Dynamic array or newer Excel functions like FILTER, XLOOKUP, SORT, or SEQUENCE may fail or degrade in older viewers.
  • A workbook can look fine while still carrying stale cached values from a prior recalculation.
  • Saving the wrong workbook view can replace formulas with cached values and quietly destroy a live model.
  • Copying formulas without checking relative references can push one bad range across an entire block.
  • Hidden sheets, named ranges, validations, and merged areas often keep business logic that is invisible in a quick skim.
  • A workbook can appear numerically correct while still failing because filters, conditional formats, print settings, or data validation were stripped.
  • A workbook can be numerically correct and still fail visually because wrapped text, clipped labels, or narrow columns were never reviewed.

Related Skills

Install with clawhub install <slug> if user confirms:

  • csv — Plain-text tabular import and export workflows.
  • data — General data handling patterns before spreadsheet output.
  • data-analysis — Higher-level analysis that can feed workbook deliverables.

Feedback

  • If useful: clawhub star excel-xlsx
  • Stay updated: clawhub sync

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

excelxlsxspreadsheetopenpyxlfinancial-modelingdata-exportformula-engineeringtemplate-preservationcsv-conversioncross-platform

同类 Skill