Bulk Generation
Generate hundreds of documents at once by uploading a simple Excel file.
How it Works
- Select a template on the Templates page and open the Bulk Generate tab.
- Download the sample Excel — it comes pre-filled with the correct column headers for your template.
- Fill in your data — one row per document.
- Upload the file — DocGenLab queues a job, processes every row, and packages the results into a ZIP archive.
- Download the ZIP when the job status shows
ready.
Excel File Format
Your .xlsx file is the data source.
- Row 1 (Header) — column names must match your template token names exactly (case-insensitive, spaces auto-converted to underscores).
- Rows 2+ — each row produces one document.
- Empty cells — treated as empty string in the document.
Example
Template tokens: {{ name }}, {{ date }}, {{ amount }}
| name | date | amount |
|---|---|---|
| John Doe | 2024-01-15 | 500.00 |
| Jane Smith | 2024-01-16 | 1200.50 |
Header auto-correction
DocGenLab normalises column headers automatically:
| Excel header | Template token | Result |
|---|---|---|
Customer Name | {{ Customer_Name }} | ✅ Linked |
customer name | {{ customer_name }} | ✅ Linked |
INVOICE NUMBER | {{ invoice_number }} | ✅ Linked |
Special Data Types
Dates
Excel date cells are formatted to YYYY-MM-DD by default. If you need a different format, format the column as Text in Excel and write the date string yourself.
Numbers
Whole numbers stored as floats (e.g., 1234.0) are automatically written as integers (1234) in the document.
Images
To embed images per-row:
- Ensure your template has an image token (e.g.,
{{ img_signature }}). - In the Excel column
img_signature, provide the public URL of the image for that row.
https://example.com/signatures/john_doe.png
Lists / Nested Data (Single Generation Only)
Bulk generation creates one flat document per row. If your template contains a {% for %} loop (e.g., a line-items table), you currently need Single Generation with a JSON input containing the nested array.
Use the Generate → Single → JSON tab to pass nested data:
{
"client_name": "Acme Corp",
"line_items": [
{ "name": "Widget A", "qty": 2, "price": 50 },
{ "name": "Widget B", "qty": 1, "price": 200 }
]
}
Output
- Format: ZIP archive (
.zip) - Contents: All generated files (PDF and/or DOCX) named after the template and row number
- Error report: If some rows fail, an error report Excel is included in the ZIP with the failure reason per row
Job Statuses
| Status | Meaning |
|---|---|
queued | Job received, waiting to start |
validating | Checking the Excel file headers |
processing | Generating documents row by row |
ready | All done — ZIP is available to download |
failed | Fatal error (check the error message) |
Tips
- Use the Download Sample button to get the correct headers — don't guess them.
- Run a small test batch (5–10 rows) before uploading thousands of rows.
- For large batches, generation runs in the background — you don't need to keep the browser open.
- Check the error report if some documents fail — it tells you which row and what went wrong.