Skip to main content

Bulk Generation

Generate hundreds of documents at once by uploading a simple Excel file.

How it Works

  1. Select a template on the Templates page and open the Bulk Generate tab.
  2. Download the sample Excel — it comes pre-filled with the correct column headers for your template.
  3. Fill in your data — one row per document.
  4. Upload the file — DocGenLab queues a job, processes every row, and packages the results into a ZIP archive.
  5. 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 }}

namedateamount
John Doe2024-01-15500.00
Jane Smith2024-01-161200.50

Header auto-correction

DocGenLab normalises column headers automatically:

Excel headerTemplate tokenResult
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:

  1. Ensure your template has an image token (e.g., {{ img_signature }}).
  2. 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

StatusMeaning
queuedJob received, waiting to start
validatingChecking the Excel file headers
processingGenerating documents row by row
readyAll done — ZIP is available to download
failedFatal 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.