30

I have the requirement to embed a Google Docs spreadsheet on a webpage, but it needs to be just the editable cells, without the Google navigation and toolbar at the top.

I can't find a reference to the querystring variables for embedding Google docs anywhere but it seems that the only thing which removes the toolbar etc is by adding 'output=html' to the querystring. However, this is what seems to be converting it from an editable spreadsheet to a non-editable spreadsheet too, which is the problem.

Can anyone suggest how to manipulate the URL below to produce an editable document with only the cells visible (no toolbar)?

https://docs.google.com/spreadsheet/ccc?key=0AngcQK0IFROwdHZySkUwd0JtY0N6Zk5RaTAyZDFVekE&widget=true

Note, this URL doesn't work - it's just an example.

Thanks!

5 Answers 5

48

Try adding rm=minimal as in:
https://docs.google.com/spreadsheet/ccc?key=0AngcQK0IFROwdHZySkUwd0JtY0N6Zk5RaTAyZDFVekE&rm=minimal

3
  • Looks like it stopped working recently, works for spreadsheets, but not for docs (shows 'File unavailable' popup, removing rm=minimal fixes it) :/ i.imgur.com/RiCDlom.png
    – pambuk
    Jun 8, 2015 at 9:19
  • @pambuk Looks that now is fixed. I just tried both, docs and spreadsheets, embedded in google sites pages through the "Include gadget (iframe)".
    – Wicket
    Sep 11, 2015 at 18:07
  • 2
    Worked for me just now. I think the people it didn't work for may not know what query parameters are and were interpreting this answer very literally instead of using ? instead of & when appropriate. See stackoverflow.com/a/32747537/470749
    – Ryan
    Aug 30, 2018 at 12:55
13

The answer provided by Henrique requires a slight adjustment to work with the new Sheets.

Add ?rm=minimal to the end of your document's URL, i.e.

https://docs.google.com/spreadsheets/d/1zHZdAImcjI4gAy5ATBA0rSImYUowL4HC8h-vvYOdpfA/edit?rm=minimal

0
9

Try these parameters, as described here:

  • single – setting to true displays just one sheet in the spreadsheet. The default sheet it will display is the first one created in the spreadsheet. This can be changed using ‘gid’ below.

  • gid – this needs to be a numeric identifier of the sheet you want to display. The first sheet created is 0, but others will have longer identifiers. To find the ‘gid’ for the sheet you want to display, go to the spreadsheet in Google Apps itself, and click on to your desired sheet. The URL in your browser should change to something like this: https://docs.google.com/a/mycompany.com/spreadsheets/d/15B___SOYjsRmU9tiwZly318HZnFHOHeayS6UTHx7Pu2I/edit#gid=419657423

    The bit at the end of the URL shows you the gid for the sheet, and that is the number you need to bring into the shortcode in your website.

  • range – set this to the cell range you want to display within the sheet (or leave it out to display the whole sheet). In our example, we set this to f2:g6. Note if you’re being pedantic then you should really change the : to %3A since colons should be encoded in URLs – but most browsers should understand the colon, so don’t worry. If you like to be correct, you’d use range=f2%3Ag6 instead.

  • headers – setting this to false hides the row numbers and column letters.

  • widget – setting this to false removes the sheet selector bar when it’s embedded.

  • chrome – setting this to false removes the title bar showing the spreadsheet name, above the sheet.

So putting it all together:

iframe src="https://docs.google.com/spreadsheets/d/[Googlekey]/pubhtml?gid=28&range=a1:s45&single=true&widget=true&headers=false"

1
  • 7
    Note that these query strings are only supported for the "Published" sheets, not the editable links discussed in other answers. Sep 26, 2019 at 20:37
4

This works:

https://docs.google.com/spreadsheets/d/1MEdbr8WA.../edit?rm=minimal#gid=0

Don't forget to include the /edit? part before rm=minimal.

(The sheet has to be shared as Access:Anyone (no sign-in required) with Can edit option selected → Public on the web - Anyone on the Internet can find and edit)

2

Well, as of Sept 2018 and on a privately shared (lengthy URL, but no password, easily testable in a private browser window), you have at least these 2 options:

    https://docs.google.com/spreadsheets/d/[hash]/edit#gid=0

Which gets you all the header crud. Even on a read-only share. (you can leave out the /edit#gid=0 part, but it will be added again)

    https://docs.google.com/spreadsheets/d/[hash]/htmlview

Which leaves out all of the header crud:

enter image description here

1
  • 1
    Your second option is not producing an editable spreadsheet that OP asked for. Dec 21, 2021 at 15:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.