Embed editable Google Docs spreadsheet without header & toolbar

前端 未结 5 522
离开以前
离开以前 2020-12-05 02:55

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.

相关标签:
5条回答
  • 2020-12-05 03:30

    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)

    0 讨论(0)
  • 2020-12-05 03:31

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

    0 讨论(0)
  • 2020-12-05 03:40

    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 讨论(0)
  • 2020-12-05 03:42

    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"

    0 讨论(0)
  • 2020-12-05 03:44

    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:

    0 讨论(0)
提交回复
热议问题