Nathan
Nathan

Reputation: 89

Using Google Sheets /copy url parameter in iframe usage case

I am designing an exercise in an e-learning application. I have a template Google Spreadsheet and can display the spreadsheet within the software as an iframe.

enter image description here

Document URL (it's just a sample table) https://docs.google.com/spreadsheets/d/1zmZ-oW8lC2Hus-G70O3CkhmGE5qqnoOGmSZMH6x526U/edit?usp=sharing

I learned about the /copy parameter that can be added to a url to generate a copy of that document so that the editing does not overwrite the original. Source: https://www.makeuseof.com/tag/make-copy-trick-sharing-google-drive-documents/

Spreadsheet URL with copy parameter https://docs.google.com/spreadsheets/d/1zmZ-oW8lC2Hus-G70O3CkhmGE5qqnoOGmSZMH6x526U/copy

Copy Sheets

However, when I run that url as the iframe's source, it returns an error: enter image description here

I learned that it is not the issue with the iframe, having tried the url on the w3 schools iframe demo with the same result. Source: https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe

enter image description here

From this StackOverflow answer, I believe I understand that the iframe will not permit executing JavaScript within it and I expect that Javascript is being used to generate a copy.

Answer: Google Spreadsheets redirect

My question becomes, is there an alternative way for an end user (student) to generate a Google Sheets copy url and have that appear in an iframe in a homework lesson?

Desired Result:

This in the iframe (or equivalent):

Copy Enabled

and be able to edit that copy as their own document

Desired Outcome in Application

Upvotes: 0

Views: 750

Answers (0)

Related Questions