Publish to the web spreadsheet with script

212 views
Skip to first unread message

luckro spot

unread,
May 22, 2019, 11:35:01 AM5/22/19
to Google Apps Script Community
Hi all, first time here so forgive me for any wrong posting...
I have a Google Spreadsheet that includes a script (called by a custom menu option) and now I'd like to publish the same spreadsheet (including the script) as a WEB page. 
Is it possible to do so? 
When I publish the Spreadsheet (using File + Publish to the WEB) it does publish the spreadsheet but does not include the script.
Many thanks in advance for any hints on how to achieve my goal.
Regards

Martin Hawksey

unread,
May 22, 2019, 12:20:10 PM5/22/19
to google-apps-sc...@googlegroups.com
Hi - the File + Publish to the WEB option unfortunately is just a static version with no interactivity/scripting. App Script does has other publication options that do enable web/html interactivity. If these are going to work for you really relies on your use case. What is it you are trying to do?

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/f6f649f7-d715-42d2-92b9-2f98b9fb713e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

luckro spot

unread,
May 22, 2019, 12:45:53 PM5/22/19
to Google Apps Script Community
HI Martin, many thanks for taking your time to answer,
What I want to accomplish is the following:
- I have this simple spreadsheet where each row has some general information and in one cell there is the name of a jpg file stored on the Google Drive 
- The user selects the cell of the picture he wants to look at and runs the custom menu option "Retrieve Picture". 
- The script is executed and that shows the picture to the user in a new tab
- In this new tab the user makes a choice from a dropdown to Approve or Reject the picture
- The script then adds the result to the corresponding (row, column) of the original tab.
- I would like to make the same functionality (including data + script + approval process) available on a WEB page in such a way that the user won't see the "raw" spreadsheet but instead a better looking page

Hope I've made myself clear enough...(english is not my primary language)

Best

Martin Hawksey

unread,
May 23, 2019, 1:55:58 AM5/23/19
to google-apps-sc...@googlegroups.com
Given the level of interaction you are looking for you might want to look at his you can serve custom html using Google Apps Script which users can interact with and update your sheet.


... and how your web app can communicate with your data https://developers.google.com/apps-script/guides/html/communication

I'm struggling to find an example that is similar to your use case but this post has an example of a simple web app that updates a Google Sheet https://mashe.hawksey.info/2017/02/google-apps-script-the-authenicated-mobile-playground-demo-of-image-capture-and-pdf-publication/ 

Others in the community might have better examples...

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-script-community.

Clark Lind

unread,
May 23, 2019, 11:58:27 AM5/23/19
to Google Apps Script Community
This series of videos walks through it pretty well. Highly recommend for users wanting to learn about creating a WebApp from scratch and serving html via Apps Script:


Cheers,
Clark
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-community+unsub...@googlegroups.com.

luckro spot

unread,
May 23, 2019, 8:04:47 PM5/23/19
to Google Apps Script Community
Martin & Clark, many thanks for your useful information, I guess I will be able to walk by my own from now.

Regards, Simon


Em quarta-feira, 22 de maio de 2019 12:35:01 UTC-3, luckro spot escreveu:
Reply all
Reply to author
Forward
0 new messages