I was trying to get add some custom scripts into google Sheets. But got so many problems even after following the ditto steps as given in the guides of GoogleCodeLabs.
that's my code main.gs file
function doGet() {
return HtmlService.createHtmlOutputFromFile('Index');
}
function doSomething() {
Logger.log('I was called!');
}
index.html file
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<script>
google.script.run.doSomething();
</script>
</head>
<body>
</body>
</html>
appsscript.json file
{
"timeZone": "Asia/Kolkata",
"dependencies": {
},
"webapp": {
"access": "MYSELF",
"executeAs": "USER_DEPLOYING"
},
"exceptionLogging": "STACKDRIVER",
"oauthScopes": ["https://www.googleapis.com/auth/spreadsheets.readonly",
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/script.container.ui"],
"runtimeVersion": "V8"
}
also i am deploying it with every small changes but even after doing the same as mentioned in the guides i couldn't log the output. what am i missing?