LoginSignup
0
0

More than 5 years have passed since last update.

(質問)[GoogleAppScript]htmlからスクリプトを実行する

Last updated at Posted at 2018-07-05

GoogleAppscrptについてわかる方が居られましたらご教授お願いいたします。
「mian.gs」からhtmlファイルを表示して。htmlファイルから「main.gs」の関数を実行する機能を実装したいです。
htmlの表示までうまく行っているのですが、htmlから「main.gs」の関数が実行できずに困っております。
ソース、実行結果は下記の通りなのですが、何かわかる方がおられましたら、ご教授お願いいたします。
●ソース
https://script.google.com/d/1KEGwlzuD0nVI2LhaXMQ1quFThYOz6sL5Y-0g-oIJX50kBI8qoA4Qg3Fh/edit?usp=sharing
●実行結果
https://script.google.com/macros/s/AKfycbxR7xFOFAddt3QEKJoBms3lTfp5MxmXCdC2HW3WVZX88lY59I9Y/exec
●main.gs
function doGet()
{
return HtmlService.createHtmlOutputFromFile('index');
}
function getText(){
Logger.log('start');
return "main.gsの返却値";
}
●index.html
<!DOCTYPE html>





version1.00

<?= getText(); ?>


●出力結果
version1.00
<?= getText(); ?>

・参考
https://tonari-it.com/gas-web-appli-function-return/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0