Create Table in WordPress from Google Sheets


Creating table from spreadsheet application (such as Excel, Calc, or Google Sheets) is much faster than to do it from HTML editor. Converting table from spreadsheet application to HTML code is not too difficult but the problem is the generated code is such a mess. This tutorial will show how to create table in wordpress from google sheets in a better way with a cleaner code.

How To

1. Install wordpress plugin, TablePress.
2. Create a table in Google Sheets.
3. Install Google Sheets add-ons, Power Tools. Go to Add-ons menu -> Get Add-ons… -> search Power Tools.
01 Power Tools addons

4. After Power Tools installed, go to Add-ons menu -> Power Tools -> Start. This will initiate the add-ons and show Power tools sidebar.
02 Start Power tools sidebar

5. Select the required cells in spreadsheet -> in Power tools sidebar choose Convert -> check Export range to: and uncheck the other -> choose JSON -> click Convert.
03 Export to JSON

6. Copy the JSON code.
04 JSON produced

7. In wordpress dashboard go to TablePress menu -> Import a Table.
8. Choose Input Source: Manual Input -> paste the JSON code to Import data: -> choose Import Format: JSON -> click Import.
05 TablePress table import

9. Copy the shortcode to your post to insert the table. If you want to merge across row, insert #colspan# to the right of filled cell. To merge across column, insert #rowspan# to the below of filled cell. Don’t forget to click Save Changes button.
06 Table preview

–end–