Create, read, edit, analyze, convert, chart, and validate spreadsheet files including XLSX, XLSM, XLS, CSV, and TSV. Use when a spreadsheet is a primary input o
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-spreadsheets-1ef8d8b56668 ,按照其中的说明把「spreadsheets」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Use openpyxl for XLSX/XLSM authoring, xlrd for legacy XLS reading, pandas for substantial data cleaning or analysis, and the standard csv module for simple CSV/TSV work. Preserve the source unless the user explicitly requests an in-place edit.
Use the bundled inspector before unfamiliar edits:
python <this-skill-directory>/scripts/inspect_workbook.py input.xlsx
openpyxl.load_workbook(..., keep_vba=True) for XLSM files and preserve the .xlsm extension. Do not claim that macros were inspected or are safe merely because they were preserved.xlrd reads values and basic metadata but does not provide reliable modern editing. Convert the result to XLSX or CSV instead of overwriting the XLS file.='Revenue Model'!B4, even when the current name has no spaces.#REF!, #DIV/0!, #VALUE!, #NAME?, #NUM!, #NULL!, and unexpected circular references.openpyxl writes formulas but does not calculate them. If formulas must be recalculated, open and save a copy with LibreOffice or Excel when available, then reopen the result with data_only=False and data_only=True. Never replace formulas with calculated constants merely to make validation pass. Read formulas.md for the detailed validation contract.
Read formatting.md before creating or substantially redesigning a workbook.
Read charts.md before creating or editing charts. Create a chart only when it improves comparison, trend, distribution, ranking, progress, or relationship understanding.
Use the bundled converter for a clean, typed, filterable workbook:
python <this-skill-directory>/scripts/csv_to_xlsx.py input.csv output.xlsx
python <this-skill-directory>/scripts/csv_to_xlsx.py input.tsv output.xlsx --delimiter tab
The converter infers conservative scalar types, freezes the header, creates a table, applies number formats, and caps column widths. Inspect identifiers and locale-specific dates before accepting inferred types.
Run structural validation after every create or edit operation:
python <this-skill-directory>/scripts/validate_workbook.py output.xlsx
When LibreOffice and a PDF renderer are available, render the workbook:
python <this-skill-directory>/scripts/render_workbook.py output.xlsx rendered
Inspect every rendered page at normal zoom. Check for clipped headers or values, unexpected blank pages, broken charts, unreadable colors, bad page breaks, missing glyphs, formula errors, and content outside the visible area. Rendering does not prove formula correctness; structural and formula validation remain required.
If rendering is unavailable, report that only structural validation was completed. Do not imply that a workbook passed visual QA.
Deliver only the requested workbook or tabular output unless the user asks for previews or intermediates. Report the output path, important sheets or changes, formula/recalculation status, validation performed, and any limitation involving macros, legacy XLS, unsupported formulas, fonts, or rendering.