Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google sheet embed URL documentation

Does anyone know if there is any official documentation for google spreadsheet embed URL paramaters?

That is, given an embed URL from Google Sheets like this: https://docs.google.com/a/aicr.org/spreadsheet/pub?key=0AhExuVBhVYT1dGxxejBmUHAzYUhGb25veTRkdW1YekE&single=true&gid=1&output=html&gridlines=false

  1. What do the arguments do, and
  2. What other arguments are available, that aren't included by default?

After much digging and searching, I have found:

  • Some parameters don't seem to do anything (&single=true, &embedded=true)
  • Some parameters are declared confidently in google search results, but don't work (&gridlines=false)
  • Some parameters don't seem to appear in any searches I have done (&output=csv)

... and no search I have done has produced anything even remotely approaching either of:

  • an official, google-maintained document for embed URLs
  • a code view of the code that is used to parse the embed URLs

By trial and error I have found:

  • &key=[ID]
    • google sheet ID
  • &single=[true|false]
    • true: ??? (present when I have published only a single sheet)
    • false: ???
  • &gid=[#]
    • sheet ID ??? (present when I have published only a single sheet)
    • perhaps this can be used to specify a sheet and range when your entire google sheets doc has been 'published to the web' (instead of just one sheet from your doc)
  • &range=[CellAddress1:CellAddress2]
    • specify a range of cells to include, eg "B1:C20"
    • if 'widget=' is false or not present, suppresses display of the usual google header & footer info
    • if the range spacified is larger than the published sheet, displays only the sheet while still suppressing the header and footer.
  • &embedded=[true|false]
    • true: ???
    • false: ???
    • this item is included in the embed code offered from within google sheets (set to "true"), but doesn't seem to have any effect.
  • &widget=[true|false]
    • true: display entire shared item. Overrides "range=". Does NOT include the google disclaimer footer.
    • false: include google disclaimer footer in output (unless 'range=' is also present)
  • &output=[html|txt|csv]
    • html (default): output as an html table within code that also includes Google tracking code
    • txt: output the content of the specified range or sheet as tab separated text
    • csv: output as csv
  • &gridlines=[???]
    • this apparently used to work but doesn't work for me.
    • To suppress gridlines in embedded sheets I set borders on all cells, then color the borders to match the sheet's background color (eg solid white borders on a white-background sheet).
like image 233
mmccarn Avatar asked May 03 '14 15:05

mmccarn


People also ask

Can you embed documents in Google Sheets?

Open a file in Google Sheets. Publish to web. In the window that appears, click Embed. Click Publish.

Can you embed a Word document in Google Sheets?

Import a Word Document Into Google SheetsIn the Ribbon, select Home > Clipboard > Copy (or press CTRL + C). Open the Google sheet to import the Word document into. Position the cursor where the document is to be pasted and then press CTRL + V to paste the information into the Google sheet.


2 Answers

Here are some of the parameters I found for Google Docs (thanks goes to Joel http://obstruction.tumblr.com/post/60784440737/google-docs-url-parameters-rm-minimal-rm-full):

Google Docs URL parameters:

rm=minimal rm=full rm=embedded rm=demo rm=(render mode)  ui=2 (select the interface version) chrome=false (full screen mode) frameborder=(size of border) q=(Whatever) Search Query  gid=24 (Which sheet you want to display) widget=false single=true range=A2:AA26 Output=html format=(export spreadsheet) format=xlsx format=csv  widget=false width=(width) height=(height) viewer? start= channel= ibd= client= 
like image 54
Maksim Luzik Avatar answered Sep 23 '22 02:09

Maksim Luzik


I've been looking for the same thing! One more URL parameter I have found useful is

  • &rm=[minimal|?]
    • minimal: hides the top menu and cell inspector, but still shows row numbers, column letters, and the Add More Rows feature at the bottom.

This resource describes some of the parameters, though I can't vouch for its accuracy. http://www.goopal.org/google-sites-business/google-spreadsheets/spreadsheet-output/publish-spreadsheet#TOC-Other-Export-Parameters

like image 35
culurienneldoreth Avatar answered Sep 24 '22 02:09

culurienneldoreth