pdf-to-excel
Skill0 starsChanged 59 days agoMITView on GitHub
Convert PDF to Excel. Use when the user says "convert pdf to excel", "pdf to excel", "pdf to xlsx", "pdf to csv", "extract tables from this pdf", "put this bank statement in excel", "turn this invoice pdf into a spreadsheet", or "copy the table from this pdf into excel". Extracts every table from one or more PDFs (bank statements, invoices, price lists, reports) into a clean .xlsx with real numbers and dates, merged multi-page tables, bold headers, filters and frozen header row.
- Installs packages
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Find the input: Use the PDF path(s) the user gave.
- Very specific: line 26
If the header looks like data or columns are shifted, re-run with --no-merge or a page range and compare.
- Distinctive: line 27
If there is a warning about a scanned PDF, say so plainly: the file is an image and needs OCR.
- Distinctive: line 28
If no tables were detected, read the PDF text and build the sheet yourself with openpyxl, using the same formatting (bold header, frozen …
- Distinctive: line 34
Never invent numbers. If a cell cannot be read, leave it empty and mention it.
- Distinctive: line 35
Keep the original PDF unchanged.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
PDF to Excel
Turn tables inside PDFs into a spreadsheet the user can sort, filter and sum right away.
Steps
- Find the input. Use the PDF path(s) the user gave. If they attached a file, use its path. If none was given, ask which PDF.
- Check dependencies once:
python -c "import pdfplumber, openpyxl". If it fails, runpip install pdfplumber openpyxl. - Run the converter (from this skill's folder):
Options:python scripts/pdf_to_excel.py "input.pdf" -o "input.xlsx"- several PDFs at once: list them all; each gets its own sheet(s)
--pages 2-4only some pages--decimal commafor European numbers like1.234,50(Norwegian, German, French statements);--decimal dotfor1,234.50. Defaultautoguesses per cell.--no-mergekeep each table on its own sheet (default merges tables that continue across pages)--csvalso write CSV files
- Read the JSON summary the script prints and check it:
headerlooks like real column names,rowscount is plausible for the document.- If the header looks like data or columns are shifted, re-run with
--no-mergeor a page range and compare. - If there is a warning about a scanned PDF, say so plainly: the file is an image and needs OCR. Offer to read the pages visually and type the table into Excel instead (fine for a page or two).
- If no tables were detected, read the PDF text and build the sheet yourself with openpyxl, using the same formatting (bold header, frozen first row, filter, numbers as numbers).
- Spot-check 2–3 values: open the workbook with openpyxl and compare a few cells (first row, last row, a total) against the PDF text. Fix the decimal option if amounts are off by a factor of 100 or 1000.
- Report back briefly: output path, sheets, row counts, and anything the user should check (e.g. a column that stayed text). For bank statements, offer a totals row or a pivot by category.
Rules
- Never invent numbers. If a cell cannot be read, leave it empty and mention it.
- Keep the original PDF unchanged; write the .xlsx next to it unless the user named another location.
- Account numbers and IDs with leading zeros stay text so the zeros are kept.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

