◈ Mail → Excel

Excel export for Accountants

By the Mail → Excel team · Updated 2026-10-20

Month-end closing starts with a list of what arrived and what is still missing. The spreadsheet is the checklist, the mailbox is the source of truth. This page lists the exact columns, an example row and the command that produces it.

Columns to keep

ColumnWhy it matters
vendorWho sent the invoice — the first thing you sort by when reconciling.
invoice_noThe unique key. Deduplicate on this column, never on the subject line.
amountStore as a number with a separate currency column; never sum mixed currencies.
vatKeep tax separate from the net amount so the report matches the ledger.
due_dateISO date — the column that turns a list into a payment calendar.

Example row

One real-shaped row from this role’s export:

vendorinvoice_noamountvatdue_date
Acme Supplies LtdINV-2026-10421,240.5020%2026-10-28

Export it in one command

python mail_to_excel.py \
  --host imap.example.com --user you@example.com \
  --days 31 --fields vendor,invoice_no,amount,vat,due_date \
  --out accountant.xlsx

The --fields option is what turns a raw dump into a report your role can use.

Provider notes

Gmail and personal Outlook accept app passwords. Corporate Microsoft 365 tenants often require OAuth, so ask IT before the first run.

Two pitfalls that ruin the file

Next step

Step-by-step: export accountant email to Excel · all roles · ready script ($3)

FAQ

Should I export attachments too?

Yes for audit trail: keep the PDF next to the row. The script saves the folder and the spreadsheet references the file name.

How far back should the export go?

One period at a time (month or quarter). A date filter keeps the file small and the reconciliation simple.

Is there a ready script for this?

Yes — the Python script exports any IMAP mailbox with the fields listed above; it costs $3 and runs locally.

Related guides