xlsx
What it does
This tool helps you work with spreadsheet files (like Excel). You can use it to create new spreadsheets, edit existing ones, add formulas, format data, fix errors, or convert between different spreadsheet file types.
When to use it
- βCreating a new monthly expense list.
- βAdding a total column to an existing sales table.
- βConverting a list of names from a text file into a spreadsheet.
Skill link
https://github.com/anthropics/skills/blob/main/skills/xlsx/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCreate a spreadsheet with monthly sales for 2023, including a column for each month's total and a row for the annual total.β
5 new skills a week. 1 minute to read.
xlsx: full guide
Spreadsheet work looks simple until a file has to be right. An agent can write a total as a fixed number, pick a function that Excel cannot read, or save a file that shows empty cells in a previewer. This skill gives the agent a set of rules for avoiding those problems, plus a script that recalculates the file and reports formula errors.
It is for people who get tabular files from other people and need them cleaned, extended or built: finance staff, analysts, small business owners, researchers. You do not need to know Python. You name the file and describe the result you want. The skill covers .xlsx, .xlsm, .xltx, .csv and .tsv files, including messy exports with misplaced headers or junk rows. It does not apply when the main result should be a Word file, an HTML report or a Google Sheets integration.
Use cases
Clean a messy CSV export
A bank or shop system gives you a CSV with a title line above the headers, blank rows in the middle and dates stored as text. You ask for a tidy workbook with proper headers and date columns, and a total per category written as formulas.
Add calculations to a file you did not build
A colleague sends a budget workbook and asks you to add a variance column. The skill tells the agent to find the existing input cells, match the file's fonts and colors, leave current formulas untouched, and write the new formulas next to them.
Build a fill-in template
You need a monthly expense tracker for a team. The agent creates the workbook with a short legend naming which cells to edit and one example row showing the expected format. Totals are formulas, so they update when people type in their numbers.
Step by step
- 1Install the skill by placing its folder in ~/.claude/skills/xlsx/ (or in your project's .claude/skills/). The skill expects LibreOffice to be available, because the recalculation script uses it.
- 2Tell the agent where your file is, or describe the new workbook. Give exact tab names and column headers if you have them, because the skill follows your specification literally.
- 3Say who fills in which cells and where numbers come from. The skill documents assumptions and hardcoded values in comments or nearby cells.
- 4Let the agent write the file and run the recalculation script. Ask it to show the result, including the count of formulas and any errors found.
- 5Open the file in Excel or LibreOffice. Check two or three formulas against numbers you know before you rely on the rest.
Example
What to ask
βOpen expenses-2024.csv in my downloads. Make a workbook with one tab named Expenses and one named Summary. Summary should show the total per category with formulas, and a grand total at the bottom.β
What you get
You get expenses-2024.xlsx with the cleaned data on Expenses and a Summary tab built with SUMIFS formulas plus a grand total. The agent reports the formula count, confirms no errors were found, and lists any assumptions, such as how blank amounts were treated.
Tips
- βA clean recalculation only proves the formulas run, not that they are right. A wrong range gives clean but wrong numbers, so compare a few results with a manual check.
- βAvoid newer Excel functions such as XLOOKUP, FILTER or UNIQUE. The skill says the recalculation tool cannot evaluate them. Ask for INDEX/MATCH or SUMIFS instead.
- βIf you send a file with text boxes, shapes or slicers, tell the agent. Saving through the library can drop them, and the skill says to warn you or edit the file's XML directly.
- βMacro files (.xlsm) lose their macros unless the agent is told to keep them. Mention the macros in your request so it takes care.
Alternatives
- excel-author
Pick it when the main goal is an Excel workbook that a reviewer will audit, with named ranges and clear formatting, rather than editing or converting existing files.
- google-workspace-ops
Pick it when your spreadsheet lives in Google Sheets and you want to find, summarize and edit it there instead of working on a downloaded file.
Questions and answers
Does the skill change the formulas already in my file?
When editing an existing file, the skill says to match its conventions, write only in the designated input cells and leave existing formulas untouched. If you want existing formulas changed, say so clearly in your request.
Will my workbook work in Excel and Google Sheets?
The skill targets Excel-compatible files and avoids functions that its LibreOffice check cannot evaluate. It does not describe Google Sheets testing, so open the result there and check key formulas yourself.
What happens if some formulas cannot be calculated?
The recalculation report lists formulas it cannot evaluate, such as links to other workbooks. The skill says to leave them in place and tell you, because their values may be missing or stale until Excel opens the file.
How it works
The tool uses specialized programs to read, write, and calculate within spreadsheet files. It ensures formulas are used instead of fixed numbers and that files are formatted professionally.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
XLSX creation, editing, and analysis
| Task | Approach |
|---|---|
| Create or edit with formulas/formatting | openpyxl β see gotchas below |
| Bulk data in or out | pandas (read_excel, to_excel) |
| Quick look at a sheet | markitdown file.xlsx β ## SheetName per sheet; reads .xlsm too. No cell coordinates, so don't plan edits from it |
| Read a model (formulas and values) | two load_workbook passes β see gotchas |
openpyxl,pandas, andmarkitdownare preinstalled β do not runpip installfirst; write the script and import directly. Only if an import fails (or themarkitdowncommand is missing):pip installthe missing package.
Script paths below are relative to this skill's directory.
Requirements for every output
- Professional font (Arial, Times New Roman) throughout, unless the user says otherwise.
- Zero formula errors. Never ship while
recalc.pyreportserrors_found. If you think an error predates you, prove it: load the original withdata_only=Trueand look at that cell. An error you introduced looks exactly like one you inherited. - Use formulas, never hardcoded results. Write
sheet['B10'] = '=SUM(B2:B9)', not the Python-computed total. The sheet must recalculate when its inputs change. - Follow the user's spec literally. Exact tab names, exact column headers, and the formula they spelled out. A redesign that computes something else fails, however elegant.
- Document every assumption and hardcoded number where the reader will see it β a cell comment, or an adjacent cell at a table's end. Cite a real source when one exists (
Source: Company 10-K, FY2024, Page 45, Revenue Note, [SEC EDGAR URL]); when the number came from the user, say so plainly. - A workbook you create for someone to fill in needs a short legend naming which cells to edit, and one example row of realistic values showing the expected format. Never add such a row to a file you were asked to edit.
- Editing an existing file: match its conventions exactly. They override every guideline here. Find its designated input cells first β a distinct font color, fill, or shading marks them β write only there, and leave every existing formula untouched.
Recalculate (mandatory whenever the file contains formulas)
openpyxl writes formulas as strings with no cached values. Until you recalculate, every
formula cell reads back as None to anything reading cached values β pandas,
load_workbook(data_only=True), and most previewers.
python scripts/recalc.py output.xlsx [timeout_seconds] # default 30
LibreOffice computes every formula, the file is rewritten in place, and you get JSON:
status (success | errors_found), total_formulas, total_errors, and an
error_summary naming up to 100 cells per error type (locations_truncated says how many it
withheld β trust total_errors, not the length of the list). Fix what it names and run it
again. JSON with an error key instead of a status means nothing was recalculated, and
only that case exits non-zero β errors_found exits 0, so never treat a clean exit as a clean
workbook.
A green recalc proves your formulas evaluate, not that they are right. An off-by-one range or a reference to the wrong row yields a clean, error-free file with wrong numbers. Write 2β3 formulas first and check they pull the values you expect, before building out a grid.
A workbook that links to another file loses those links if you re-save it with openpyxl and
then recalculate. Such a formula reads ='[1]Returns Analysis'!$B$2 β the [1] is an index
into the workbook's external-reference list, naming a separate file on disk, not a sheet.
That file is rarely present here, so the cell's cached value is the only thing holding its
data. openpyxl strips that value on save; LibreOffice then has to resolve the reference for
real, fails, writes #NAME?, and deletes every link. recalc.py refuses to run in that state
β copy those cells' values out of the original before you save over them (--force overrides,
and accepts the loss).
Choosing formulas that survive verification
LibreOffice implements fewer functions than Excel, and one it cannot evaluate becomes a
literal #NAME? baked into the file you deliver.
- Prefer Excel-2007-era functions β
SUMIFS,INDEX,MATCH,IFERROR,SUMPRODUCTβ which need no prefix.
β¦
FAQ
What are .xlsx, .xlsm, .xltx, .csv, .tsv files?
These are different types of files used to store data in a table format, like those used in spreadsheet programs (Excel, Google Sheets).
What does 'use formulas instead of hardcoded results' mean?
It means that instead of calculating a total and writing the number directly into the cell, the tool inserts a formula (like =SUM(A1:A10)) that calculates the result automatically. This way, if the data changes, the result updates.
Why do I need to recalculate a file?
When the tool writes formulas into a file, the program reading the file might not see the calculated result immediately. Recalculating ensures all formulas are executed and results are shown correctly before delivering the file.
Details
Original description by the author
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger e
repo: anthropics/skills
Popularity
- GitHub stars
- 181k
- Ranking position
- #653
- License
- β
- Updated
- 10/9/2026
Comments
- β¦
More skills from this repository
academy-guide
181kHas your agent recommend courses and tutorials for learning Claude. It's useful when you have questions about how to use Claude or its products.
algorithmic-art
181kHelps your agent create art using code, generating unique images. It's useful when you want original computer-generated art.
brand-guidelines
181kHas your agent apply Anthropic's brand colors and visual style to materials. It's useful for maintaining the company's visual identity across projects.
canvas-design
181kHelps your agent create beautiful visual art in files. It's useful when you ask for a poster, art, or any static design.
Similar skills
feishu-doc
394kHelps your agent read, create, and edit Feishu cloud documents, including text, images, and tables, using the document tool.
feishu-drive
394kLets your agent browse, organize, and comment on files in a Feishu cloud folder that has been shared with the bot.
feishu-perm
394kHelps your agent check and change who can access a Feishu file, choosing the smallest permission that meets your request.