{"id":4255,"date":"2014-03-14T09:53:36","date_gmt":"2014-03-14T00:53:36","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=4255"},"modified":"2014-03-14T17:36:59","modified_gmt":"2014-03-14T08:36:59","slug":"google-apps-script%e3%82%b5%e3%82%a4%e3%83%89%e3%83%90%e3%83%bc%e3%82%92%e8%a1%a8%e7%a4%ba%e3%81%99%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=4255","title":{"rendered":"[Google Apps Script]\u30b5\u30a4\u30c9\u30d0\u30fc\u3092\u8868\u793a\u3059\u308b"},"content":{"rendered":"<ul>\n<li>Google Apps Script\u3067\u30b5\u30a4\u30c9\u30d0\u30fc\u3092\u8868\u793a\u3057\u307e\u3059\u3002<\/li>\n<li>\u30b5\u30a4\u30c9\u30d0\u30fc\u306e\u5185\u5bb9\u306f<span style=\"color: #ff0000; font-weight: bold;\">createHtmlOutputFromFile<\/span>\u30e1\u30bd\u30c3\u30c9\u3067\u8aad\u307f\u8fbc\u3080HTML\u3067\u3001jQuery\u3092\u6271\u3046\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/li>\n<li>Google \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8 \u30a2\u30c9\u30aa\u30f3\u3067\u306fCSS\u306e\u30d1\u30c3\u30b1\u30fc\u30b8(<span style=\"color: #ff0000; font-weight: bold;\">https:\/\/ssl.gstatic.com\/docs\/script\/css\/add-ons.css<\/span>)\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u3066\u3001link\u8981\u7d20\u3067\u8aad\u307f\u8fbc\u3093\u3067\u5229\u7528\u3057\u307e\u3059\u3002<\/li>\n<li>HTML\u5074\u304b\u3089\u30b5\u30fc\u30d0\u30fc\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u547c\u3073\u51fa\u3059\u3068\u304d\u306f\u300c<span style=\"color: #ff0000; font-weight: bold;\">google.script.run<\/span>\u300d\u3092\u4f7f\u3044\u307e\u3059\u3002<\/li>\n<\/ul>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\/\/var ui = SpreadsheetApp.getUi();\r\nvar ui = DocumentApp.getUi();\r\n\r\nfunction onOpen(e){\r\n    var html = HtmlService.createHtmlOutputFromFile('Sidebar').setTitle('\u30b5\u30f3\u30d7\u30eb \u30b5\u30a4\u30c9\u30d0\u30fc').setWidth(300);\r\n    ui.showSidebar(html);\r\n}\r\n\r\nfunction showAlert(arg){\r\n    ui.alert('Hello! ' + arg);\r\n}<\/pre>\n<p><strong>\u30fbSidebar.html<\/strong><\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;link rel=&quot;stylesheet&quot; href=&quot;https:\/\/ssl.gstatic.com\/docs\/script\/css\/add-ons.css&quot;&gt;\r\n&lt;script src=&quot;\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.11.0\/jquery.min.js&quot;&gt;&lt;\/script&gt;\r\n&lt;script&gt;\r\n    $(function(){\r\n        $('#btnOK').click(function(){\r\n            google.script.run.showAlert('Taro.');\r\n        });\r\n    });\r\n&lt;\/script&gt;\r\n&lt;p&gt;&lt;button id=&quot;btnOK&quot; class=&quot;action&quot;&gt;OK&lt;\/button&gt;&lt;\/p&gt;<\/pre>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_02_01.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_02_01.jpg\" alt=\"GoogleAppsScript_02_01\" width=\"507\" height=\"319\" class=\"alignnone size-full wp-image-4256\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_02_01.jpg 507w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_02_01-300x188.jpg 300w\" sizes=\"auto, (max-width: 507px) 100vw, 507px\" \/><\/a><\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_02_02.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_02_02.jpg\" alt=\"GoogleAppsScript_02_02\" width=\"437\" height=\"193\" class=\"alignnone size-full wp-image-4257\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_02_02.jpg 437w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScript_02_02-300x132.jpg 300w\" sizes=\"auto, (max-width: 437px) 100vw, 437px\" \/><\/a><\/p>\n<ul>\n<li>CSS Package for Add-ons<\/li>\n<li style=\"list-style-type:none;\"><a href=\"https:\/\/developers.google.com\/apps-script\/add-ons\/css?hl=ja\" target=\"_blank\" title=\"CSS Package for Add-ons\">https:\/\/developers.google.com\/apps-script\/add-ons\/css?hl=ja<\/a><\/li>\n<li>HTML Service: Create and Serve HTML<\/li>\n<li style=\"list-style-type:none;\"><a href=\"https:\/\/developers.google.com\/apps-script\/guides\/html\/?hl=ja\" target=\"_blank\" title=\"HTML Service: Create and Serve HTML\">https:\/\/developers.google.com\/apps-script\/guides\/html\/?hl=ja<\/a><\/li>\n<li>HTML Service<\/li>\n<li style=\"list-style-type:none;\"><a href=\"https:\/\/developers.google.com\/apps-script\/reference\/html\/?hl=ja\" target=\"_blank\" title=\"HTML Service\">https:\/\/developers.google.com\/apps-script\/reference\/html\/?hl=ja<\/a><\/li>\n<li>createHtmlOutputFromFile(filename)<\/li>\n<li style=\"list-style-type:none;\"><a href=\"https:\/\/developers.google.com\/apps-script\/reference\/html\/html-service?hl=ja#createHtmlOutputFromFile%28String%29\" target=\"_blank\" title=\"createHtmlOutputFromFile(filename)\">https:\/\/developers.google.com\/apps-script\/reference\/html\/html-service?hl=ja#createHtmlOutputFromFile%28String%29<\/a><\/li>\n<li>Class HtmlOutput<\/li>\n<li style=\"list-style-type:none;\"><a href=\"https:\/\/developers.google.com\/apps-script\/reference\/html\/html-output?hl=ja\" target=\"_blank\" title=\"Class HtmlOutput\">https:\/\/developers.google.com\/apps-script\/reference\/html\/html-output?hl=ja<\/a><\/li>\n<li>showSidebar(userInterface)<\/li>\n<li style=\"list-style-type:none;\"><a href=\"https:\/\/developers.google.com\/apps-script\/reference\/base\/ui?hl=ja#showSidebar%28Object%29\" target=\"_blank\" title=\"showSidebar(userInterface)\">https:\/\/developers.google.com\/apps-script\/reference\/base\/ui?hl=ja#showSidebar%28Object%29<\/a><\/li>\n<li>Class google.script.run (Client-side API)<\/li>\n<li style=\"list-style-type:none;\"><a href=\"https:\/\/developers.google.com\/apps-script\/guides\/html\/reference\/run?hl=ja\" target=\"_blank\" title=\"Class google.script.run (Client-side API)\">https:\/\/developers.google.com\/apps-script\/guides\/html\/reference\/run?hl=ja<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"Google Apps Script\u3067\u30b5\u30a4\u30c9\u30d0\u30fc\u3092\u8868\u793a\u3057\u307e\u3059\u3002 \u30b5\u30a4\u30c9\u30d0\u30fc\u306e\u5185\u5bb9\u306fcreateHtmlOutputFromFile\u30e1\u30bd\u30c3\u30c9\u3067\u8aad\u307f\u8fbc\u3080HTML\u3067\u3001jQuery\u3092\u6271\u3046\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002 Google \u30c9\u30ad\u30e5\u30e1\u30f3 [&hellip;]","protected":false},"author":1,"featured_media":7113,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[126],"tags":[],"class_list":["post-4255","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-google"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Google.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-16D","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4255"}],"version-history":[{"count":5,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4255\/revisions"}],"predecessor-version":[{"id":4264,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4255\/revisions\/4264"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7113"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}