Doc2Sheet
Turn invoices and receipts (PDFs, scans, phone photos) into clean spreadsheet rows. A vision LLM reads each document, and deterministic checks re-do the arithmetic, so a wrong total gets flagged instead of slipping into your books.
Real results on four sample documents
Pick a document to see what was extracted and what the checks said. All four samples are fictional.
How it works
One model call per document, surrounded by plain code that doesn't trust the model.
What the checks catch
Each document ends up ok, review or failed.
total_mismatchSubtotal, discount, charges and tax don't add up to the printed total. Tax-inclusive pricing is recognised.
line_math · items_vs_subtotalA quantity × unit price that doesn't match its line, or lines that don't sum to the subtotal.
due_before_issue · future_dateImpossible dates. Ambiguous ones like 05/03/2026 are refused rather than guessed.
missing_* · invalid_currencyNo total, vendor, date or ISO currency code, so a person should take a look.
Run it yourself
Web UI, batch CLI and Python API. Works with Hugging Face Inference Providers, OpenAI, Gemini, OpenRouter, or fully offline with Ollama.
git clone
cd doc2sheet
pip install -e ".[app]"
# put HF_TOKEN=hf_... in .env (or point DOC2SHEET_BASE_URL at Ollama)
python app.py # web UI on http://127.0.0.1:7860
python -m doc2sheet invoices/ -o results.xlsx # a whole folder → one workbook
Hosting a live Gradio demo on Hugging Face now requires a paid plan, so this page shows recorded results instead.