Please wait...

Creating Tables in WordPress from Google Spreadsheets

Video versionA video overview of creating wpDataTables from Google Spreadsheets

wpDataTable Google Spreadsheet integration

Google Spreadsheets is an extremely popular way to create and edit tables online because of its advanced functionality. It’s free, it does not require installing any software on a client’s computer, it supports importing data from popular office software programs, and it stores all the data online. We could not of course ignore this format, so with version 1.6 wpDataTables now supports Google Spreadsheets as an input data source.

See this example (published Google spreadsheet), and the table rendered from this Google Spreadsheet below.

The step-by-step tutorial on creating wpDataTables from Google Spreadsheets is below the table.

When using Google Spreadsheets as the data source please note 2 things:
1. The data is read from the data source every time the page loads, so when your tables are large (more then 2000-3000 cells) this source won’t be the right choice since the page with large tables will load slow, or even crash after reaching a certain size.
2. There is a cache on the Google side, so when you update the table it might take up to 5-15 minutes to be reflected in wpDataTable.

Instructions to create the table

Open Google Spreadsheets, find the spreadsheet you would like to use in wpDataTables; or create one.

To create a new Google Spreadsheet click the “plus” button in the right bottom corner:

Once you’ve opened the Google Spreadsheets editing mode, you can enter the data that you need. Alternatively, you can copy&paste the table data from your favorite software – e.g., MS Excel, Numbers, or LibreOffice.

Data is auto-saved on the Google Spreadsheets side whenever you change it, but to be able to use it in wpDataTables you first need to publish it.

Go to File -> Publish to the web… 

Publish link for Google Spreadsheet

then choose Entire document, and click Publish to get the link. Note: Please, don’t copy the link that is first shown in Publish section.

Instead, copy this link from your browser, since you will use it in wpDataTables (the links aren’t same, and with the first one you will not be able to create the table).

  • If you are going to use a Google Spreadsheet with formulas, please follow this – Tutorial
  • Keep in mind that wpDataTables doesn’t support Google Spreadsheet with merged cells.
  • Also, don’t apply any formatting in this new sheet. You can make whatever adjustment you may need in WpDataTables.

Create wpDataTable from a Google Spreadsheet

Once the Google spreadsheet is prepared, the next step is to go to your WordPress admin and create a new wpDataTable:

Create a table linked to an existing data source

1. Go to wpDataTables -> Create a Table, and choose Create a table linked to an existing data source option.

add-from-data source google spreadsheet

2. Set a name for your new wpDataTable to help you to find the table later.
3. Choose Google Spreadsheet as the Input data source type.
4. Paste the spreadsheet link that you copied in step 1 to the Input file or URL input field.

Once you do this, click “Apply“. wpDataTables will read the table content and columns structure, and try to guess the column data types.

If you have an SSL certification error after you copy Google Spreadsheet link to create a table, open the file source/class.wdttools.php in the plugin fold, around line 146 you’ll find a setting for cURL. Please add the two following lines:

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

(OPTIONAL) - define additional table and columns settings

filter type select box

For any wpDataTable, you can define any settings you need for the table itself, and for all the columns. The table might be responsive or not, it may or may not have table tools or advanced filtering; you can choose the filter types for each column, etc. In our example we set the filter type for City column as “Select box”

Insert the wpDataTable in your page or post

Inserting wpDataTables shortcode on page or post

When a wpDataTable is created, you can use it in a post or page.

Create a post or page, or open a post/page that you already have for editing.

Pick a place where you would like to paste your table and place the cursor there; then, click the “Insert a wpDataTable” button, and pick the table that you created in step 2:

As an alternative, you can simply 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 with the data from your Google Spreadsheet.

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.