Complete Guide: Filling PDF Forms from Excel
If you have a PDF with form fields and an Excel spreadsheet with data, Mergram can fill in every form automatically — no manual entry needed. This guide walks you through the entire process, from preparing your files to generating completed documents at scale.
Prerequisites
Before you begin, make sure you have:
- A PDF with form fields (AcroForm-compatible) — created in Adobe Acrobat, LibreOffice, or any standard PDF editor
- An Excel (.xlsx/.xls) or CSV (.csv) file with your data organized in columns and rows
- A free Mergram account (no credit card required)
Not sure if your PDF has form fields?
Open your PDF in Adobe Acrobat Reader and look for highlighted interactive areas. If you can type into fields or check boxes, your PDF has form fields ready for auto-filling.
Understanding PDF Form Fields
PDF form fields (also called AcroForm fields) are interactive areas in a PDF that accept user input. Common types include:
| Field Type | Description | Example Use |
|---|---|---|
| Text fields | Free-form text input | Name, address, phone, dates |
| Checkboxes | Yes/no toggle options | ”I agree to terms” |
| Radio buttons | Single-choice selections | Payment method: credit / debit / PayPal |
| Dropdowns | Pre-defined option lists | State, country, department |
Each field has a name (its identifier) and a value (the data that fills it). Mergram reads these field names and matches them to your spreadsheet columns.
Preparing Your Spreadsheet
Your spreadsheet should follow these guidelines:
- Column headers should match field names (or be similar for fuzzy matching)
- One row per document — each row generates one completed PDF
- Consistent formatting — dates as dates, numbers as numbers
- No merged cells — keep the structure simple and tabular
Example data table:
| Name | Date | Amount | Department | |
|---|---|---|---|---|
| John Smith | john@example.com | 2025-01-15 | $150.00 | Engineering |
| Jane Doe | jane@example.com | 2025-01-15 | $200.00 | Marketing |
| Bob Garcia | bob@example.com | 2025-01-16 | $175.00 | Sales |
Data formatting tips
For best results, avoid special characters in column headers, trim leading/trailing whitespace from your data, and remove any empty rows at the bottom of your sheet. These small steps prevent mapping errors.
Auto-Mapping: How Mergram Connects Columns to Fields
Mergram uses fuzzy matching to connect spreadsheet columns to PDF form fields. This means the names don’t need to be identical — similar names are matched automatically:
ClientName↔Client Name↔client_nameEmailAddress↔Email↔email_addressPhoneNumber↔Phone↔phone_number
After auto-mapping, you can review every mapping and adjust any that aren’t correct. Fields that couldn’t be auto-mapped are highlighted for manual assignment.
When to Use PDF Form Filling
This approach is ideal when you have a pre-existing PDF form with defined fields. Common scenarios include:
- Government forms — Tax forms, visa applications, compliance documents
- HR documents — Employee onboarding forms, benefits enrollment
- Legal contracts — Standard agreement templates with variable fields
- Insurance claims — Claim forms with policyholder and incident data
- Education — Transcript requests, enrollment forms, certificate applications
If your PDF doesn’t have form fields, you can still place data fields visually using the canvas editor — see the mail merge with Google Sheets guide for that approach.
Best Practices for Reliable Merging
- Name fields clearly in your PDF editor — use descriptive names like
client_first_nameinstead offield1 - Test with 2–3 rows before running the full dataset to catch mapping issues early
- Use the preview to verify each field renders correctly with real data
- Check date formats — ensure your spreadsheet dates match what the form expects
- Validate required fields — make sure no critical columns have empty values
Common Issues and Troubleshooting
Fields not detected: Your PDF may use XFA forms (dynamic XML forms) instead of AcroForm fields. Try re-saving the PDF in Adobe Acrobat as a “standard” PDF with AcroForm fields.
Wrong data in fields: Check that your column mappings are correct. Fuzzy matching sometimes pairs similar-but-different column names. Unlink and re-map the field manually.
Special characters appearing incorrectly: Save your CSV file with UTF-8 encoding to preserve accented characters, CJK text, and other Unicode content.
Large file processing slowly: For spreadsheets with thousands of rows, the merge runs server-side as a background job. You can close the browser and check back — progress is tracked in the Jobs panel.
XFA forms are not supported
PDF forms based on XFA (XML Forms Architecture) are not compatible with Mergram’s form detection. Most modern PDFs use AcroForm fields, which are fully supported. If you’re unsure, try uploading your PDF — the editor will detect all available fields automatically.
Get Started
Upload your PDF form and Excel file to Mergram’s editor to start filling forms automatically. The free plan lets you test with small batches — upgrade when you’re ready to process at scale.