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
- What do the arguments do, and
- 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]
- &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).