Ready to get started?Download WordPress

Plugin Directory

Inline Google Spreadsheet Viewer

Embeds a public Google Spreadsheet in a WordPress post or page as an HTML table.

Fetches a publicly shared Google Spreadsheet using a [gdoc key=""] WordPress shortcode, then renders it as an HTML table, embedded in your blog post or page. The only required parameter is key, which specifies the document you'd like to retrieve. Optionally, you can also strip a certain number of rows (e.g., strip="3" omits the top 3 rows of the spreadsheet) and you can supply a table summary, <caption> and customized class value.

Your spreadsheet must be shared using either the "Public on the web" or "Anyone with the link" options. Currently, private Google Spreadsheets or Spreadsheets shared with "Specific people" are not supported.

After setting the appropriate Sharing setting, copy the URL you use to view the Spreadsheet from your browser's address bar into the shortcode. For example, to display the spreadsheet at https://docs.google.com/spreadsheets/d/ABCDEFG/edit, use the following shortcode in your WordPress post or page:

[gdoc key="https://docs.google.com/spreadsheets/d/ABCDEFG/edit"]

If your spreadsheet uses the "old" Google Spreadsheets, you need to ensure that your spreadsheet is "Published to the Web" and you need to copy only the "key" out of the URL. For instance, if the URL of your old Google Spreadsheet is https://docs.google.com/spreadsheets/pub?key=ABCDEFG, then your shortcode should look like this:

[gdoc key="ABCDEFG"]

To render the HTML table with additional metadata, you can also do the following:

[gdoc key="ABCDEFG" class="my-sheet" summary="An example spreadsheet, with a summary."]This is the table's caption.[/gdoc]

The above shortcode will produce HTML that looks something like the following:

<table id="igsv-ABCDEFG" class="igsv-table my-sheet" summary="An example spreadsheet, with a summary.">
    <caption>This is the table's caption.</caption>
    <!-- ...rest of table code using spreadsheet data here... -->

You can use the gid attribute to embed a worksheet other than the first one (the one on the far left). For example, to display a worksheet published at https://spreadsheets.google.com/pub?key=ABCDEFG&gid=4, use the following shortcode in your WordPress post or page:

[gdoc key="ABCDEFG" gid="4"]

The header_rows attribute lets you specify how many rows should be rendered as the table header. For example, to render a worksheet's top 3 rows inside the <thead> element, use:

[gdoc key="ABCDEFG" header_rows="3"]

All tables are progressively enhanced with jQuery DataTables to provide sorting, searching, and pagination functions on the table display itself. If you'd like a specific table not to include this functionality, use the no-datatables class in your shortcode. For instance:

[gdoc key="ABCDEFG" class="no-datatables"]

For DataTables-enhanced tables, you can also specify columns that you'd like to "freeze" when the user scrolls large tables horizontally. To do so, use the FixedColumns-left-N and FixedColumns-right-N classes, where N is the number of columns you'd like to freeze. For instance, to display the three left-most columns and the right-most column in a fixed (frozen) position, use the following in your shortcode:

[gdoc key="ABCDEFG" class="FixedColumns-left-3 FixedColumns-right-1"]

Web addresses and email addresses in your data are turned into links. If this causes problems, you can disable this behavior by specifying no to the linkify attribute in your shortcode. For instance:

[godc key="ABCDEFG" linkify="no"]

Requires: 3.3 or higher
Compatible up to: 3.9.2
Last Updated: 2014-8-13
Downloads: 11,568


3 stars
3.3 out of 5 stars


10 of 11 support threads in the last two months have been resolved.

Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.

0,1,0 100,1,1
100,1,1 0,1,0