bruce
bruce

Reputation: 1408

create a dynamic html file and execute it in google apps script

I'm trying to migrate various Excel applications to Google Apps. These generate html and javaScript based on various excel data and parameters to create a local html file which is then opened by a browser.

I know it's a long shot, but can anyone think of a way to mimic this behavior in Google Apps Script? Namely - create a file on the client and fetch it up in a browser session.

Here's an example of the type of application I mean

Upvotes: 1

Views: 1492

Answers (2)

Stangoesagain
Stangoesagain

Reputation: 75

Just saw this:

https://googledrive.com/host/0B716ywBKT84AMXBENXlnYmJISlE/GoogleDriveHosting.html

HTML files uploaded to Public Google Drive folder are served as HTML, link is available through "Preview" button.

So far it doesn't work with Google Drive files simply moved to that folder but perhaps would work with files created there via createFile script.

Upvotes: 0

Eric Koleda
Eric Koleda

Reputation: 12673

You can use DocsListApp.createFile to create new HTML files on the user's Google Drive, but I don't believe you can serve the HTML from Drive directly. Alternatively you can use the SitesApp to create a new page on a Google Site with the HTML you want, using Site.addWebPage. Finally, you may want to look into the widgets available in UiApp or the UI Builder, to see if you can use those instead of custom HTML.

Upvotes: 1

Related Questions