Please wait...

Table tools

Video versionA video overview of table tools in wpDataTables

Table toolswpDataTables Toolkit for exporting

Table Tools is an additional block of buttons that provides some extra features for the tables: export to PDF, export to CSV, export to Excel, print view, toggle for column visibility for front-end users, etc. This functionality is based on 3rd party HTML5 library. There are some limitations in this library that we want to put it in the very top so you would be aware of these

show x entries
  • For tables with server-side processing only the visible rows will be exported to any format. This means that if you want the whole table to be exported (or copied to clipboard), you would need to choose “Show All” feature in the “show … entries” block, and then do the export:
  • Generated PDF, XLS, CSV are not customizable. Unfortunately the library does not allow much of “fine-tuning” of the generated files, so font, size, and other properties cannot be changed (but the title can – see below).
  • Conditional formatting is not reflected in any of generated export files.
  • Other front-end extensions cannot be combined with Table Tools. E.g. if you have row grouping enabled for the table, or some customizations you did yourself, they wouldn’t be reflected in the generated Excel, CSV or PDF document, neither in the clipboard.

Copy to clipboardTool for copying table content

Copy button triggers the “copy to clipboard” function, so it copies all the rows that exist in the page to your OS clipboard and you can later paste it in some other software. Once you click it, you get a popup with notification on how many rows were copied to the clipboard, e.g. “Copied 20 rows to the clipboard”. All the rows are copied to the clipboard, including headers, tab-separated; you can paste it then to e.g. MS Excel. For tables with server-side processing enabled, this copies only the visible columns.

PDF exportTool to generate a PDF file with the table content

“PDF” button generates a new PDF document out of the table, and calls the browser’s “Save as …” dialog so you could choose a path for your file. It is a very basic PDF with the page title, and the table with simple formatting:

For tables with server-side processing enabled, PDF will contain only the visible rows.

CSV exportTool for saving table content in a CSV file

“CSV” button generates a new file in “Comma-Separated-Values” format out of the table, and calls the browser’s “Save as …” dialog so you could choose a path for your file. All the values from your table, including the headers will be exported. The cells will be separated by commas, rows will be separated by line breaks:

For tables with server-side processing enabled, CSV file will contain only the visible rows.

Print buttonTool for printing the table content

“Print” button uses jQuery functionality to hide all the elements on the page, except for the table. For some themes it can look weird, but for most of these it will work correctly, and make the view of the page “printable”.

Excel exportTool for exporting table content to an Excel file

“Excel” button generates an Excel file with the visible table data.

The Excel file layout isn’t customizable. If you would like to generate customized Excel or Word files with the table content, check out the Report Builder addon.

Column visibilityTool to allow front-end users to toggle column visibility

If this button is turned on for the table, your front-end table users will be able to toggle visibility of the table’s columns. Please note that it also includes the columns that you’ve hidden from the back-end. You can un-select the button to hide the column, select it back to show it.

Configuring Table ToolsHow to customize which tools will be added for a table

table tools

You can configure separately for each table which buttons will be included the Table Tools block. To enable/disable the Table Tools block you can check or uncheck the Table Tools checkbox in the table configuration.

If the Table Tools are enabled, you can open the dropdown with buttons list to define which particular buttons to include.

table tools buttons

Default export filename will be derived from the table title. To change the export filename and the displayed title, add an ‘export_file_name’ attribute to the table shortcode. E.g. if you define the shortcode like:

[wpdatatable id=1 export_file_name='My Export File']

The filenames of exported files will be: “My Export File.pdf”, “My Export File.xls”, etc.

Never miss new features!

Join 2000+ newsletter subscribers

Never miss notifications about new cool features, promotions, giveaways or freebies - subscribe to our newsletter! We send about one mail per month, and do our best to keep our announcements interesting.

We never spam or disclose your address to anyone.