1
votes

I would like to have a section in the web page the initially displays "Login with Google" button. When user clicks it and authenticates the section should display read-only spreadsheet from the user's own Google Drive that was previously created elsewhere. The name and location of the doc would be the same for any user. If user has no doc at that location (say Drive/foo) the simple error message is displayed.

I would prefer not to have iframe and have no problem coding in JavaScript. In fact I prefer to code the whole thing in JavaScript

P.S. If this is not currently possible it would be nice to get it confirmed by someone in the Google Drive SDK team

1
I'm curious on who downvoted the question without providing at least an explanation? As far as I can tell this has not been asked or answered before - Bostone

1 Answers

0
votes

There are a number of approaches you can take. Two that spring to mind ...

  1. Publish the spreadsheet*s* to HTML and then simply include the HTML within the page.

  2. Use the SDK from Javascript to export the spreadsheet as HTML, then include in the page as (1).

Option 1 is crude, but very quick to implement and requires only a minimal amount of Apps Script code. Option 2 is the pukka approach, but requires you dealing with OAuth and the Drive SDK, so is non-trivial.

There may well be other approaches.