Please wait...

Creating Tables in WordPress from Excel

Video versionA video overview of Excel-based wpDataTables

WordPress table based on Excel file examplewpDataTables is deeply integrated with Excel

Microsoft Excel is a leading software program for working with spreadsheets. Most likely, no other software is as commonly used for tables; and .XLS and .XLSX formats are also so common for storing and exchanging table data that they could also be considered standard. Consequently, wpDataTables could not be looked upon as a fully-functional tool if it wouldn’t support this format as well.

You can download the Excel file used in this tutorial by this link.

See the resulting table first, and the step-by-step tutorial to create it below.

When working with Excel-based tables, please note 2 things:

  1. Formulas and merged cells are not supported,
  2. They generally work slower than CSV-files, or even Google Spreadsheets; so if your table is large, it is much better to port it to a different format, or – even better – to MySQL table (you can use “Create a table by importing data from data source” to import your Excel file to MySQL).

Instructions to create the table

First, prepare an Excel file with your data. It doesn’t have to necessarily be prepared in MS Excel, it can be prepared in other software – e.g. OpenOffice or Libre Office. The necessary thing is to save it in an .XLS or .XLSX format.

Excel table example

Create a wpDataTable and upload the Excel file

Once the .XLS or .XLSX file is prepared, you need to create a wpDataTable in your WordPress admin which will pull the data from it.

Creating tables
  1. Go to WordPress admin, and open wpDataTables -> Create a table
  2. Click on Create a table linked to an existing data source.
Create Excel table

3. Provide a name for the new wpDataTable in the “Table title” input to help you identify it.
4. Select “Excel file” as Table Type.
5. Click on the Upload file button to open the WordPress media library.

6. Upload the Excel file that you prepared; then click Use in wpDataTable.

Excel table upload

7. Click “Save” so wpDataTable will read the column structure and save it.

Note: Your Excel file should be on the same domain as WordPress.

(Optional) - Define additional table and column settings

When the table structure is read from the Excel file, you might wish to define additional settings for the table (responsiveness, table tools, layout, etc.) and for individual columns (column data type, filter, change the displayed name). You can read this documentation section for all the details related to different table features, and this documentation section for descriptions of different column features.

In this example table, we defined the filter type for the “Star column as “Number range“.

To achieve that, you will need to open Column settings.
There are 2 ways to do so:

1. By clicking on the Column settings button

Excel column settings

2. Or, by clicking on the yellow button on top of the table.
In this dialog you can quickly rename, reorder, or toggle visibility for columns.

Column settings
Image Excel settings

Now, you can click on the Filtering tab, and for the filter type select Number range for the “Star” column.
Also, we will define the value that will be set as a default predefined filter value on page load.
Let’s set that, for example from 1 to 5.

Now that we’ve configured our table, click on the Apply button.

Insert the wpDataTable in your page or post

Inserting wpDataTables shortcode on page or post

When you’ve finished preparing your Excel-based wpDataTable, you can insert it in the post or page.

Create a post or page, or open one of the posts/pages you already have for editing.

Place the cursor in the post or page where you want to insert the table, click the “Insert a wpDataTable” button, and pick the table that you created in previous steps:

If you prefer, you can just copy & paste the generated wpDataTable shortcode.
When you save the post or page, and open it in the front-end, you will see the wpDataTable generated from your Excel file. Now you have Excel in WordPress.

Do you have the best

essential plugins installed?
Grab the best 46 plugins. Tested and sorted.

Plugins for SEO, Caching, Security, Design and UX, Stats & analytics, Social sharing. Only the best ones.

By clicking "subscribe" you consent that the information you provide via this form will be securely processed and stored in compliance with EU privacy laws (GDPR).

Thank you for subscribing!

Please check your inbox to download the WordPress goodies.