Skip to content

Instantly share code, notes, and snippets.

@WakkyFree
Created July 21, 2021 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WakkyFree/b98043e70608ff1649d94362d35bd634 to your computer and use it in GitHub Desktop.
Save WakkyFree/b98043e70608ff1649d94362d35bd634 to your computer and use it in GitHub Desktop.
html to write spreadsheets by google apps script
<!DOCTYPE html>
<html>
<head>
<base target="_top">
<script type="text/javascript">
function sendText(){
google.script.run
.withSuccessHandler(inform())
.writeSheet(document.forms['formText'].elements['message'].value);
}
function inform() {
alert('スプレッドシートに書き込みました');
}
</script>
</head>
<body>
<h1>スプレッドシート書き込みテスト</h1>
<p>スプレッドシートに書き込む内容を入力↓</p>
<form name="formText">
<input type="text" name="message">
<input type="button" onclick="sendText()" value="送信">
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment