How to create a PDF invoice from Excel
Fill in an invoice sheet, set the print area so only the invoice is exported, then choose File > Save As (or Export) and pick PDF. Our free Excel invoice template already works out every line, the subtotal, tax and total, and sets the due date 14 days ahead. To turn many spreadsheet rows into separate invoice PDFs, use a short VBA loop or send the rows to an invoice PDF API.
Get the template Invoice Template (Excel) — ready to send · Free
One invoice, one PDF
- Open the template and fill in your details, the client and the items.
- Select the invoice area and choose Page Layout > Print Area > Set Print Area.
- Under Page Layout > Scale to Fit, set Width to 1 page so nothing spills onto a second sheet.
- Windows: File > Export > Create PDF/XPS. Mac: File > Save As and choose PDF as the file format.
- Open the PDF and check the totals, the dates and your payment details before sending.
Small things that make the PDF look right
- Format money cells as Currency or Accounting so every amount has the same decimals.
- Gridlines don't print unless you ask for them; leave Page Layout > Gridlines > Print unticked.
- Put your logo in with Insert > Pictures and keep it inside the print area.
- Name the file with the invoice number and client, for example INV-2026-014-Acme.pdf.
Many invoices from one sheet: VBA
If one sheet holds the invoice layout and another holds a row per client, a macro can fill the layout from each row and export it. The export itself is one line:
Sheets("Invoice").ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=ThisWorkbook.Path & "\" & Range("B3").Value & ".pdf"
Many invoices from one sheet: an API
Without macros, a script can read the rows and get a finished A4 PDF back for each invoice. Our Invoice PDF API costs $0.05 per invoice, works out subtotal, discount, tax and total, and accepts Latin letters for now. There are no free tries with your own data; the listing page shows a sample PDF.
import base64, pandas as pd
API = "https://iamai.markets/api/x402/services/usFpPnWo-JIO"
rows = pd.read_excel("billing.xlsx") # invoice_number, client, description, qty, price
for number, lines in rows.groupby("invoice_number"):
body = {
"invoice_number": number, "currency": "USD", "tax_rate": 5,
"seller": {"name": "Your Company"},
"buyer": {"name": lines["client"].iloc[0]},
"items": [{"description": d, "quantity": float(q), "unit_price": float(p)}
for d, q, p in zip(lines["description"], lines["qty"], lines["price"])],
}
r = pay_session.post(API, json=body) # requests session wrapped by an x402 v2 client
res = r.json()["result"]
open(res["filename"], "wb").write(base64.b64decode(res["pdf_base64"]))
Your options
| Option | Good for | Trade-off |
|---|---|---|
| Excel template + Save as PDF | A few invoices a month, your logo | One file at a time |
| Invoice Maker (iamai.markets, free) | A quick invoice in the browser | No logo, nothing saved |
| VBA macro | Batches, if you're happy with macros | Macro security prompts; Windows-first |
| Invoice PDF API (iamai.markets) | Batches from code or an AI agent | $0.05 per invoice, needs USDC on Base |
| Invoicing apps (Wave, Zoho Invoice) | Saved clients, reminders, online payment | An account; your data lives in the app |
The product
Questions
Why does my PDF come out on two pages?
The print area is wider than the paper. Set Scale to Fit > Width to 1 page, or narrow the columns.
Is the Excel template free?
Yes. Download it from the listing page; it costs nothing and has no watermark.
Can I make the PDF without Excel?
Yes. The free Invoice Maker at /tools/invoice-maker builds the invoice in your browser and saves it with Save as PDF.
Related
Updated 2026-12-01