Please wait...

Creating bulk XLSX files in WP Report Builder

Example of a Bulk XLSX Report with Multiple Files Bulk XLSX example

Please note that Bulk XLSX generation is a time and hardware consuming operation and works significantly slower than bulk DOCX report generation – e.g. 6-7 minutes for bulk generation of 100 files. We suggest using bulk DOCX whenever possible to avoid delays (on some hosts script execution timeouts are possible).

Report Builder for wpDataTables can be used to create multiple Excel XLSX files with actual data in one click. If you provided a data source wpDataTable, Report Builder will create a separate Excel file for each row, and fill it in with the cell values as you provide, then compress in a ZIP and send back to you.

See this example. Sort, filter, or switch pages in the table, and try to download the ZIP file to see how it adjusts to the table.

wdt_ID Client Manager Name Manager Phone Business Type Account Number
wdt_ID Client Manager Name Manager Phone Business Type Account Number

Bulk XLSX Generator for WordPressBulk XLSX generation process

Now, let’s see a step-by-step walkthrough on creating such a report in WP Report Builder for wpDataTables.

1. Prepare a wpDataTable with data.

Because WP Report Builder is an add-on for wpDataTables, it can be generated only based on a wpDataTable. So the first step for creating a bulk XLSX report is to prepare a wpDataTable.

In this case we built a wpDataTable with Table Constructor tool (imported from CSV). It had the following columns: “Client”, “Manager Name”, “Manager Phone”, “Business Type”, “Account Number”.

You can read more about creating tables in Table Constructor here.

2. Prepare the Excel XLSX template file.

Next step is to prepare the Excel file that will be filled with data. We used these variables for this specific report:

  • Predefined variables: ${generatorname} (name of the user that generated the report)
  • Additional variables: ${additionalnotes} (the “additional notes” field that can be changed from front-end)
  • Cell values from wpDataTable: ${client}, ${businesstype}, ${managername}, ${managerphone}, ${accountnumber}

Please do not forget that in Excel reports for variables to be recognised correctly they should be placed in separate cells.

See the full list of rules on preparing templates for Report Builder here.

3. Create the report in your WP-admin using the Report Builder Wizard.

Go to WP-admin, open ReportBuilder -> Create a new report

On the first step choose the source wpDataTable:

Bulk Word DOCX Report

On the next step provide the report name, choose ‘Multiple file’ generation logic (which means we’ll create a separate file for each row), tick “Follow table filtering”, set the generated filename mask as “${client}-welcome” and define one additional variable – “additionalnotes” with some default value:

Then upload the template that you have prepared (click “Browse…“, drag&drop the file, click “Use template”):

On the next step you can download the preview for X first rows of the table:

DOCX Generator for WordPress

If you are satisfied, you can click “Save Report” to store the result, if something is wrong, you can go back in the wizard and change the settings or upload a different template. Once you click “Save Report”, you will see the shortcodes for this report:

Bulk Word DOCX Report

The shortcodes contain buttons for downloading report, saving report to WP Media Library, and for inputs for additional variables.

You can copy these shortcodes directly from this page by clicking on shortcode button, but this isn’t necessary as you can always generate these in standard WordPress post/page editor, or in Visual composer.

Once you close the wizard you will be redirected to the Browse page. You can always quickly download the report (for the whole table) from there by clicking the “Download” button, or quickly get the list of available shortcodes.

The last thing to do is to insert the Report controls to the post or page where you need them, so the users would be able to use it:

  • See here how to insert the report builder controls to the post or page using standard WordPress Visual editor.
  • See here how to insert the report builder controls to the post or page using Visual Composer.