Home > database >  How to convert my google sheet script to web app?
How to convert my google sheet script to web app?

Time:06-18

I have created a Google Sheet to process a Sales and send mail from it. But I have found a limitation, it works only on PC and cannot be used on an android phone using the Sheets app. Is there a way to convert my code to a web app, use Sheets as my database and use the interface from my phone?

CodePudding user response:

Create a deployment of the project as a web-app. you'll probably want to use the Test Deployment for developing and you will need the doGet(e) function to get the page up and running.

function doGet(e)
{
   var html = HtmlService.createHtmlOutputFromFile("your_HTML_file_here");
   return html;
}

The function above creates the webpage but the rest of the code will end up in the html file that contains the web page.

To interact with google and its services you can use

google.script.run

This allows the user to run google script code from an html page.

CodePudding user response:

Not sure what you mean by "convert". You can publish your project as web app (for that you need doGet() function and some kind of UI) and then access it on mobile via URL.

  • Related