Bulk Generation
Generate hundreds of documents at once by uploading a simple Excel file.
How it Works
- Select Template: Choose the template you want to use.
- Download Sample: Get an Excel file pre-filled with the correct headers for your template.
- Fill Data: Add one row for each document you want to generate.
- Upload & Run: Upload the file, and DocGenLab will generate a ZIP file containing all your documents.
Excel File Format
Your Excel file (.xlsx) acts as the data source.
- Row 1 (Header): Must contain the Token Names exactly as they appear in your template (e.g.,
invoice_number,client_name). - Rows 2+: Each row represents one document.
- Empty Cells: Will result in empty/blank space in the document.
Example
If your template has: {{ name }}, {{ date }}, {{ amount }}
Your Excel file should look like:
| name | date | amount |
|---|---|---|
| John Doe | 2023-10-01 | 500.00 |
| Jane Smith | 2023-10-02 | 1200.50 |
Auto-Correction for Headers
DocGenLab is smart enough to handle spaces in headers.
- Template:
{{ Customer_Name }} - Excel Header:
Customer Name(with space) - Result: Linked Automatically! The system converts
Customer NametoCustomer_Namefor you.
Handling Special Data
Dates
Excel Dates are automatically formatted to DD-MM-YYYY. If you need a different format, use a Text column in Excel.
Images
To insert images via Bulk Generation:
- Ensure your template has an Image Token (e.g.,
{{ img_logo }}). - In the Excel column
img_logo, provide the Public URL of the image.- Example:
https://example.com/logo.png
- Example:
- The system will download and embed the image into the document.
Tables / Lists
Bulk generation currently creates one document per row. If you need to populate a table inside a single document (e.g., an Invoice with 10 line items), you generally need Single Generation with JSON data. Support for JSON-in-Excel cells for lists is experimental.
Output
- Format: ZIP Archive (
.zip). - Contents: A folder containing all generated files (PDF or DOCX).
- Naming: Files are automatically named using the Template Name and timestamp (e.g.,
Invoice_20231025_001.pdf).