Google Sheets Web App Example - Google Apps Script Web App Tutorial - Part 1
Why Stack Overflow recommends it
Stack Overflow users link it as a step-by-step starting point for Apps Script web apps tied to Sheets, and many askers cite it as the tutorial they were following when their code broke.
Recommended by 2 people across 2 different months, 2019 to 2021.
What it is
A 31-minute beginner tutorial from the Learn Google Sheets & Excel Spreadsheets channel on building a Google Apps Script web app that reads and writes Google Sheets data. It walks through doGet, an HTML page, client-side JavaScript and google.script.run in a step-by-step build, and is the first part of a longer playlist.
What people said
Recommends jkhadka · 2019-09 · Stack Overflow · on “Sharing google appscript or macro with other users”
Best method for me was to publish the script as webapp , so that others can use it directly. On the webapp : [LINK] Video on how to make simple webapp : [this video]
Recommends Bob Hardball · 2021-11 · Stack Overflow · on “Apps Script: Search and display sheet content in HTML”
Using @Cooper´s hint as starting point and doing a little bit more research, I stumbled upon this tutorial series ( [this video] ) that helped me do what I was trying to achieve. There are other useful tutorials there, but you will need to be VERY patient and be creative in watching and listening. Thank you so much, @Cooper! You are a true Legend - with a big "L"!!!
Cites Francisco Cortes · 2019-06 · Stack Overflow · on “button will not execute click function in google apps script html service”
I've spent 2 days trying to figure this out so any help is appreciated. I was following this nice little video tutorial series [this video] and I wanted to try something basic before getting any further: get an html button to show a javascript alert using google apps script and their HTML Service component, but for the life of me, I can't understand why the alert is not triggered. Here's my code Index.html <!DOCTYPE html> <html> <head> <script> document.getElementById("btnSearch") .addEventListener("click",showAlert); function showAlert() { alert("hello world"); } </script> </head> <body> <div> <label>Enter code</label> <input type="text" id="txtStudentID"/> <button id="btnSearch">Search</button>
Cites maxgotstuck · 2020-03 · Stack Overflow · on “Logs are not shown when the webapp is triggered by doGet”
I'm currently trying to write a form in HTML that passes its input to a spreadsheet. I did it as shown in the following video: [this video] . The problem is that the Logger in addInfo() function isn't working when the button is clicked (In the Logs is no "Hey" when the button got clicked). My Code.gs (Google Apps Script) file: function doGet(){ return HtmlService.createHtmlOutputFromFile("index"); } function addInfo(){ Logger.log("Hey"); } My index.html file: <!DOCTYPE html> <html> <head> <base target="_top"> </head> <body> <button id="btn">Klick mich</button> <script> document.getElementById("btn").addEventListener("click",doStuff); function doStuff(){ google.script.run.addInfo(); } </script> </
Cites hans villanueva · 2020-04 · Stack Overflow · on “Why is my doGet(e) function returning a null value even though i passed a parameter?”
This is my first time posting in stack overflow, i would appreciate it also if you would give feedback on how to post questions properly I am currently following this tutorial by "Learn Google Spreadsheets": Tutorial that i am following [this video] I copied this function to test if a parameter will be passed back to the server-side script (Code.gs) **Code.gs** function doGet(e) { Logger.log(e); return HtmlService.createHtmlOutputFromFile('page'); } I have also created a basic html file (page.html) that would be rendered once the project is deployed. After deploying/publishing the project as a web application I added a parameter at the link published link with added name parameters at the end [LI
Cites User1090 · 2020-08 · Stack Overflow · on “Button click only adds a part of the values array to the Google Sheets spreadsheet sheet”
I am following the video from [this video] I created the web app step by step but seems like the date is only getting recorded. Code used: Code.gs function doGet(e) { //Logger.log(e.parameter); return HtmlService.createHtmlOutputFromFile("page") } function userClicked(name){ url = " [LINK] "; var ss = SpreadsheetApp.openByUrl(url); var ws = ss.getSheetByName("Data"); ws.appendRow([name, new Date()]); //Logger.log(name+ " clicked the button"); } page.html <!DOCTYPE html> <html> <head> <base target="_top"> </head> <body> <h1> Hello </h1> <label> Name: </label> <input type = "text" id = "username"> <button id = "btn"> Click Here! </button> <script> document.getElementById("btn").addEventListener("cl
Cites James · 2021-07 · Stack Overflow · on “How to Auto-Run a Script in Google Sheets when someone's Data Entry to the Sheet?”
Dear @Cooper, do you have any example or tutorial about how I can use it, or just give an example and which file scripts from the scripts listed in this question should I add the google.script.run on? because I tried with this: [this video] , but I don't understand how can I apply it. thank you
Cites Matthew Michaud · 2021-10 · Stack Overflow · on “google.script.run function won't generate Logger.log”
@TheMaster yes, the log messages show up in the executions tab. In the tutorial I was following, the old View->Logs is all that is used. When mine didn't behave the same, I assumed there was an error. If it now only shows in the executions tab, that's fine. [this video]