◈ Mail → Excel

Excel export for Lawyers

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

Matters are defined by documents and dates. An index that maps every document to a matter saves hours before a hearing. This page lists the exact columns, an example row and the command that produces it.

Columns to keep

ColumnWhy it matters
matterThe matter number is the primary key for legal correspondence.
clientThe join key for every other report you will build later.
dateMessage date in ISO 8601; sortable and unambiguous across time zones.
documentFile name of the related attachment.
privilegeMarks privileged material so it can be filtered before sharing.

Example row

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

matterclientdatedocumentprivilege
2026-114Orion Ltd2026-10-12NDA_v2.pdfprivileged

Export it in one command

python mail_to_excel.py \
  --host imap.example.com --user you@example.com \
  --days 31 --fields matter,client,date,document,privilege \
  --out lawyer.xlsx

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

Provider notes

Corporate Exchange often blocks app passwords; use OAuth or an export from Outlook desktop.

Two pitfalls that ruin the file

Next step

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

FAQ

Does the export include email bodies?

By default it is metadata only. Bodies can be added, but then the file becomes privileged material and needs stricter storage.

Can I prove nothing was missed?

Keep the message count from the run next to the row count — that is your completeness check.

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