WordPress.org

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... -->
</table>

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"]

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.1
Last Updated: 2014-5-16
Downloads: 10,929

Ratings

3 stars
3.3 out of 5 stars

Support

7 of 8 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

1 person says it works.
0 people say it's broken.

100,1,1
100,3,3
0,1,0
50,2,1
0,1,0
33,3,1
50,2,1
0,1,0 100,1,1
0,1,0
50,2,1
0,1,0
0,1,0
100,1,1 0,1,0
100,1,1