Install
write the script and import directlyWho it's for
When a spreadsheet is the main input or output, use this xlsx guide. It covers opening, reading, editing, or repairing existing .xlsx, .xlsm, .xltx, .csv, or .tsv files. The deliverable must be a spreadsheet file.
Do not trigger this when the main deliverable is a Word document, an HTML report, a standalone Python script, a database pipeline, or a Google Sheets API integration, even if tabular data appears in the middle. The material does not list agent products; do not treat this as exclusive to one piece of software. The official guide page is
https://raw.githubusercontent.com/anthropics/skills/main/skills/xlsx/SKILL.md
First try in 3 minutes
Recommended path: openpyxl, pandas, and markitdown are all preinstalled. Do not pip install first; write a script and import them directly.
Prerequisite: the current environment can import these three libraries directly. The low-risk first try is a read-only look; do not write to disk yet. For a local spreadsheet that already exists, import markitdown for a quick view. If the file does not exist, stop at the open failure; do not create an unnamed sample sheet.
Success signal: the import succeeds and you can see a text overview of that file. This is not a repair or overwrite. If there is no existing file and the user explicitly asks for a spreadsheet, then switch to creating with openpyxl, but confirm the filename and overwrite risk before writing to disk.
When creating, remember: use formulas; do not write hardcoded results that Python already computed. The material's example writes a cell as =SUM(B2:B9) so the sheet can recalculate when inputs change.
Use cases
Case 1: Create or change a sheet that will recalculate. Write a script with the preinstalled openpyxl. After import, write totals as formulas — for example B10 uses =SUM(B2:B9) — instead of summing in Python and writing a number. Done means the file contains formulas and the sheet can recalculate after inputs change. The summary leaves pandas for bulk read/write and markitdown for a quick view; this case covers formula writes only. The excerpt does not give a complete styling API; do not invent format functions that never appear.
Case 2: A file with formulas must be recalculated before you read values. The material states: whenever the file contains formulas, recalculation is mandatory. openpyxl writes formulas as strings and has no cached values; until you recalculate, every formula cell reads back as None. This is a reversible check: open the file you just wrote and read a formula cell; if you get None, recalculation has not happened yet — stop there, finish recalculation, then treat the read value as the result. Do not interpret None as a total of zero.
Boundaries
Use this only when the spreadsheet itself is the main deliverable. Word, HTML, standalone scripts, database pipelines, and Google Sheets API do not take this path even if they contain tables. The three libraries are preinstalled; by default do not pip install first. Formulas must recalculate when inputs change; after writing you must recalculate, or reads come back as None.
Do not write a repository path that never appears as an install command. Do not pass off hardcoded numbers as totals. Before writing to disk or overwriting the original sheet, confirm the target path and side effects, then proceed. Beyond these written file types, import approach, and recalculation requirements, this guide does not cover the rest.