Please wait...

Excel XLSX Report with no source table

Example of a Excel XLSX Report with no source table XLSX example without wpDataTable

Even though WP Report Builder uses wpDataTables core functions and would not run without it, a report can be built even without a source wpDataTable.

See this example: it is a dummy bank loan calculator, you can provide your name, term of loan in years, amount to loan, and download an auto-generated loan calculation. This can be much more complex of course – Report Builder allows you to go as far as your creativity and imagination allows:

XLSX Generator for WordPress without sourceXLSX generation process with no source

These are the steps needed to create a similar auto-generated Excel file in WP Report Builder:

1. Prepare the Excel template.

As there is no wpDataTable Data Source, you can prepare the Excel template right away, and use only predefined variables, or additional variables (provided by front-end user inputs) in it. In our case we prepared a template with a formula based on several cells values, and used these additional variables in the cells:

  • ${client} – Client name;
  • ${loanamount} – Amount of money to loan;
  • ${loanterm} – Term of loan in years.

The cells “monthly payment”, “total bank interest” use Excel formulas which are calculated base on these variables.

You can download the template file which is used in this example here.

The full list of rules on preparing the templates can be found here.

2. Create the report in Report Builder Wizard.

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

On the first step do not choose any wpDataTable (just click “next”, leave “None (skip)” selected):

Excel XLSX Report with no source table

On the next step (“Settings and Variables”) we need to provide a report name, and add 3 variables, naming them the same way as we did in the template, also providing the defaults:

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 of the report (all variables will use the default values) to see if everything works correctly. If it doesn’t you can go back a step or two to modify the settings.

Excel XLSX Report with no source table

Once you click “Save Report”, you will see the shortcodes for this report:

Excel XLSX Report with no source table

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.