{"id":6415,"date":"2015-11-19T14:25:14","date_gmt":"2015-11-19T05:25:14","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=6415"},"modified":"2021-10-25T22:42:10","modified_gmt":"2021-10-25T13:42:10","slug":"vba%e3%83%9e%e3%82%af%e3%83%ad%e3%81%8b%e3%82%89google-apps-script-execution-api%e3%82%92%e5%91%bc%e3%81%b3%e5%87%ba%e3%81%99%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=6415","title":{"rendered":"VBA\u30de\u30af\u30ed\u304b\u3089Google Apps Script Execution API\u3092\u547c\u3073\u51fa\u3059\u3002"},"content":{"rendered":"<p>\u300c<a href=\"\/\/www.ka-net.org\/blog\/?p=6326\" title=\"Google Apps Script Execution API\u3092\u8a66\u3057\u3066\u307f\u305f\u3002 | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\" rel=\"noopener\">Google Apps Script Execution API\u3092\u8a66\u3057\u3066\u307f\u305f\u3002<\/a>\u300d\u8a18\u4e8b\u3092\u66f8\u3044\u3066\u304b\u3089\u3072\u3068\u6708\u7d4c\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u304c\u3001\u3088\u3046\u3084\u304f\u6642\u9593\u304c\u3068\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u306e\u3067\u3001\u5f53\u521d\u306e\u76ee\u7684\u3067\u3042\u3063\u305f<span style=\"color: #ff0000; font-weight: bold;\">\u201cVBA\u304b\u3089Google Apps Script Execution API\u3092\u547c\u3073\u51fa\u3057\u3066\u307f\u305f\u3044\uff01\u201d<\/span>\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h4 class=\"style4a\">\u5b9f\u884c\u3059\u308bGAS\u30b3\u30fc\u30c9<\/h4>\n<p>\u547c\u3073\u51fa\u3059Google Apps Script\u306e\u30b3\u30fc\u30c9\u306f\u300c<a href=\"\/\/www.ka-net.org\/blog\/?p=6326\" title=\"Google Apps Script Execution API\u3092\u8a66\u3057\u3066\u307f\u305f\u3002 | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\" rel=\"noopener\">Google Apps Script Execution API\u3092\u8a66\u3057\u3066\u307f\u305f\u3002<\/a>\u300d\u8a18\u4e8b\u306e\u3082\u306e\u3092\u305d\u306e\u307e\u307e\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>\u4e0a\u8a18\u8a18\u4e8b\u3067\u3082\u66f8\u3044\u3066\u3044\u307e\u3059\u304c\u3001API\u547c\u3073\u51fa\u3057\u524d\u306b<span style=\"color: #ff0000; font-weight: bold;\">\u5fc5\u305a myFunction \u3092\u5b9f\u884c\u3057\u3066\u52d5\u4f5c\u78ba\u8a8d\u3092\u884c\u3063\u3066\u304f\u3060\u3055\u3044\u3002<\/span><\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">function getSheetNames(sheetId) {\r\n  var ss = SpreadsheetApp.openById(sheetId);\r\n  var sheets = ss.getSheets();\r\n  return sheets.map(function(sheet) {\r\n    return sheet.getName();\r\n  });\r\n}\r\n\r\nfunction myFunction() {\r\n  Logger.log(getSheetNames(&quot;\u30b7\u30fc\u30c8ID&quot;));\r\n}<\/pre>\n<h4 class=\"style4a\">\u4e0b\u6e96\u5099<\/h4>\n<p>Execution API\u3092\u547c\u3073\u51fa\u3059\u306b\u5f53\u305f\u308a\u3001\u4e0b\u8a18\u306e\u4f5c\u696d\u304c\u4e8b\u524d\u306b\u5fc5\u8981\u3068\u306a\u308a\u307e\u3059\u304c\u3001\u4f5c\u696d\u624b\u9806\u306f\u300c<a href=\"\/\/www.ka-net.org\/blog\/?p=6326\" title=\"Google Apps Script Execution API\u3092\u8a66\u3057\u3066\u307f\u305f\u3002 | \u521d\u5fc3\u8005\u5099\u5fd8\u9332\" target=\"_blank\" rel=\"noopener\">Google Apps Script Execution API\u3092\u8a66\u3057\u3066\u307f\u305f\u3002<\/a>\u300d\u8a18\u4e8b\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\u3002<\/p>\n<ol>\n<li>\u5b9f\u884c\u53ef\u80fd API \u3068\u3057\u3066\u5c0e\u5165<\/li>\n<li>API ID\u306e\u53d6\u5f97<\/li>\n<li>\u30b9\u30b3\u30fc\u30d7\u306e\u53d6\u5f97<\/li>\n<li>Google Apps Script Execution API\u306e\u6709\u52b9\u5316<\/li>\n<li>\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 ID\u3068\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 \u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u306e\u53d6\u5f97<\/li>\n<\/ol>\n<p>\u305f\u3060\u3057\u3001\u201c\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u30e6\u30fc\u30b6\u30fc\u201d\u306f\u300c<span style=\"color: #ff0000; font-weight: bold;\">\u81ea\u5206\u306e\u307f<\/span>\u300d\u3001<\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_01.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_01.jpg\" alt=\"GoogleAppsScriptExecutionAPI_fromVBA_01\" width=\"441\" height=\"331\" class=\"alignnone size-full wp-image-6416\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_01.jpg 441w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_01-300x225.jpg 300w\" sizes=\"auto, (max-width: 441px) 100vw, 441px\" \/><\/a><\/p>\n<p>\u8a8d\u8a3c\u60c5\u5831\u306f OAuth 2.0 \u30af\u30e9\u30a4\u30a2\u30f3\u30c8 ID \u2192 \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u7a2e\u985e\uff1a<span style=\"color: #ff0000; font-weight: bold;\">\u305d\u306e\u4ed6<\/span> \u3068\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_02.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_02.jpg\" alt=\"GoogleAppsScriptExecutionAPI_fromVBA_02\" width=\"306\" height=\"409\" class=\"alignnone size-full wp-image-6417\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_02.jpg 306w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_02-224x300.jpg 224w\" sizes=\"auto, (max-width: 306px) 100vw, 306px\" \/><\/a><\/p>\n<h4 class=\"style4a\">Google Apps Script Execution API\u3092\u547c\u3073\u51fa\u3059VBA\u30b3\u30fc\u30c9<\/h4>\n<p>\u3044\u3088\u3044\u3088Execution API\u3092\u547c\u3073\u51fa\u3059VBA\u30b3\u30fc\u30c9\u3067\u3059\u3002<br \/>\nAPI ID\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 ID\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 \u30b7\u30fc\u30af\u30ec\u30c3\u30c8\u3001\u30b9\u30b3\u30fc\u30d7\u3001\u5b9f\u884c\u3059\u308bGAS\u95a2\u6570\u540d\u3001\u95a2\u6570\u306b\u6e21\u3059\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306f\u3001\u305d\u308c\u305e\u308c\u81ea\u5206\u306e\u74b0\u5883\u306b\u5fdc\u3058\u3066\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n'\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u30e6\u30fc\u30b6\u30fc:\u81ea\u5206\u306e\u307f\r\n'OAuth 2.0 \u30af\u30e9\u30a4\u30a2\u30f3\u30c8 ID(\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u7a2e\u985e:\u305d\u306e\u4ed6)\r\n'devMode:false\r\n\r\n'--------------------------------------------------\r\n'\u203b \u8981\u5909\u66f4\r\n'--------------------------------------------------\r\nPrivate Const api_id As String = &quot;API ID&quot;\r\nPrivate Const client_id As String = &quot;\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 ID&quot;\r\nPrivate Const client_secret As String = &quot;\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 \u30b7\u30fc\u30af\u30ec\u30c3\u30c8&quot;\r\n'--------------------------------------------------\r\n\r\nPrivate Const response_type As String = &quot;code&quot;\r\nPrivate Const redirect_uri As String = &quot;urn:ietf:wg:oauth:2.0:oob&quot;\r\nPrivate Const grant_type As String = &quot;authorization_code&quot;\r\n\r\nPublic Sub Sample()\r\n  Dim auth_code As String\r\n  Dim access_token As String\r\n  Dim ret As String\r\n  Const scope As String = &quot;https:\/\/www.googleapis.com\/auth\/spreadsheets&quot; '\u30b9\u30b3\u30fc\u30d7\r\n  Const function_name As String = &quot;getSheetNames&quot; '\u5b9f\u884c\u3059\u308bGAS\u95a2\u6570\u540d\r\n  Const sheet_id As String = &quot;\u30b7\u30fc\u30c8ID&quot;\r\n  \r\n  '\u521d\u671f\u5316\r\n  ret = &quot;&quot;: auth_code = &quot;&quot;: access_token = &quot;&quot;\r\n  auth_code = GetAuthorizationCode(scope)\r\n  If Len(Trim(auth_code)) &lt; 1 Then Exit Sub\r\n  access_token = GetAccessToken(auth_code)\r\n  If Len(Trim(access_token)) &lt; 1 Then Exit Sub\r\n  ret = ExecuteGASFunction(access_token, api_id, function_name, sheet_id)\r\n  Debug.Print &quot;result:&quot; &amp; ret\r\nEnd Sub\r\n\r\nPrivate Function ExecuteGASFunction(ByVal access_token As String, _\r\n                                    ByVal api_id As String, _\r\n                                    ByVal function_name As String, _\r\n                                    ByVal parameters As String, _\r\n                                    Optional ByVal dev_mode As String = &quot;false&quot;)\r\n'Google Apps Script Execution API\u547c\u3073\u51fa\u3057\r\n  Dim ret As String\r\n  Dim url As String\r\n  Dim json As String\r\n  Dim dat As Variant\r\n  Dim d As Object\r\n  Dim elm As Object\r\n  \r\n  ret = &quot;&quot; '\u521d\u671f\u5316\r\n  dat = &quot;{'function':'&quot; &amp; function_name &amp; &quot;','parameters':'&quot; &amp; parameters &amp; &quot;','devMode':&quot; &amp; dev_mode &amp; &quot;}&quot;\r\n  url = &quot;https:\/\/script.googleapis.com\/v1\/scripts\/&quot; &amp; api_id &amp; &quot;:run&quot;\r\n  With CreateObject(&quot;WinHttp.WinHttpRequest.5.1&quot;)\r\n    .Open &quot;POST&quot;, url, False\r\n    .SetRequestHeader &quot;Content-Type&quot;, &quot;application\/json; charset=UTF-8&quot;\r\n    .SetRequestHeader &quot;Authorization&quot;, &quot;Bearer &quot; &amp; access_token\r\n    .Send dat\r\n    Select Case .Status\r\n      Case 200\r\n        json = &quot;(&quot; &amp; .responseText &amp; &quot;)&quot;\r\n        Set d = CreateObject(&quot;htmlfile&quot;)\r\n        Set elm = d.createElement(&quot;span&quot;)\r\n        elm.setAttribute &quot;id&quot;, &quot;result&quot;\r\n        d.body.appendChild elm\r\n        d.parentWindow.execScript &quot;document.getElementById('result').innerText=eval(&quot; &amp; json &amp; &quot;).response.result;&quot;\r\n        ret = elm.innerText\r\n    End Select\r\n  End With\r\n  ExecuteGASFunction = ret\r\nEnd Function\r\n\r\nPrivate Function GetAuthorizationCode(ByVal scope As String) As String\r\n'Authorization code\u53d6\u5f97\r\n  Dim ie As Object\r\n  Dim url As String\r\n  Dim iptCode As Object\r\n  Dim auth_code As String\r\n  Const READYSTATE_COMPLETE = 4\r\n  \r\n  '\u521d\u671f\u5316\r\n  Set ie = Nothing\r\n  Set iptCode = Nothing\r\n  auth_code = &quot;&quot;\r\n  \r\n  url = &quot;https:\/\/accounts.google.com\/o\/oauth2\/auth?&quot; &amp; _\r\n        &quot;client_id=&quot; &amp; client_id &amp; &quot;&amp;&quot; &amp; _\r\n        &quot;response_type=&quot; &amp; response_type &amp; &quot;&amp;&quot; &amp; _\r\n        &quot;redirect_uri=&quot; &amp; redirect_uri &amp; &quot;&amp;&quot; &amp; _\r\n        &quot;scope=&quot; &amp; EncodeURL(scope)\r\n  \r\n  Set ie = CreateObject(&quot;InternetExplorer.Application&quot;)\r\n  With ie\r\n    .Visible = True\r\n    .AddressBar = False\r\n    .MenuBar = False\r\n    .StatusBar = False\r\n    .Toolbar = False\r\n    .Width = 600\r\n    .Height = 480\r\n    .Navigate url\r\n    \r\n    While .Busy Or _\r\n          .readyState &lt;&gt; READYSTATE_COMPLETE Or _\r\n          InStr(LCase(.LocationURL), &quot;https:\/\/accounts.google.com\/o\/oauth2\/approval&quot;) &lt; 1\r\n      DoEvents\r\n    Wend\r\n    \r\n    On Error Resume Next\r\n    Set iptCode = .document.getElementById(&quot;code&quot;)\r\n    On Error GoTo 0\r\n    If Not iptCode Is Nothing Then auth_code = iptCode.Value\r\n    \r\n    .Navigate &quot;https:\/\/accounts.google.com\/o\/logout&quot; '\u30ed\u30b0\u30a2\u30a6\u30c8\r\n    While .Busy Or .readyState &lt;&gt; READYSTATE_COMPLETE\r\n      DoEvents\r\n    Wend\r\n    .Quit\r\n  End With\r\n  GetAuthorizationCode = auth_code\r\nEnd Function\r\n\r\nPrivate Function GetAccessToken(ByVal auth_code As String) As String\r\n'Access token\u53d6\u5f97\r\n  Dim access_token As String\r\n  Dim json As String\r\n  Dim dat As Variant\r\n  Dim d As Object\r\n  Dim elm As Object\r\n  \r\n  access_token = &quot;&quot; '\u521d\u671f\u5316\r\n  dat = &quot;code=&quot; &amp; auth_code &amp; &quot;&amp;&quot; &amp; _\r\n        &quot;client_id=&quot; &amp; client_id &amp; &quot;&amp;&quot; &amp; _\r\n        &quot;client_secret=&quot; &amp; client_secret &amp; &quot;&amp;&quot; &amp; _\r\n        &quot;redirect_uri=&quot; &amp; redirect_uri &amp; &quot;&amp;&quot; &amp; _\r\n        &quot;grant_type=&quot; &amp; grant_type\r\n  With CreateObject(&quot;WinHttp.WinHttpRequest.5.1&quot;)\r\n    .Open &quot;POST&quot;, &quot;https:\/\/www.googleapis.com\/oauth2\/v3\/token&quot;, False\r\n    .SetRequestHeader &quot;Content-Type&quot;, &quot;application\/x-www-form-urlencoded;charset=UTF-8&quot;\r\n    .Send dat\r\n    If .Status = 200 Then\r\n      json = .responseText\r\n      If Len(Trim(json)) &gt; 0 Then\r\n        json = &quot;(&quot; &amp; .responseText &amp; &quot;)&quot;\r\n        Set d = CreateObject(&quot;htmlfile&quot;)\r\n        Set elm = d.createElement(&quot;span&quot;)\r\n        elm.setAttribute &quot;id&quot;, &quot;result&quot;\r\n        d.body.appendChild elm\r\n        d.parentWindow.execScript &quot;document.getElementById('result').innerText=eval(&quot; &amp; json &amp; &quot;).access_token;&quot;\r\n        access_token = elm.innerText\r\n      End If\r\n    End If\r\n  End With\r\n  GetAccessToken = access_token\r\nEnd Function\r\n\r\nPrivate Function EncodeURL(ByVal str As String) As String\r\n'URL\u30a8\u30f3\u30b3\u30fc\u30c9\r\n  Dim d As Object\r\n  Dim elm As Object\r\n  \r\n  str = Replace(str, &quot;\\&quot;, &quot;\\\\&quot;)\r\n  str = Replace(str, &quot;'&quot;, &quot;\\'&quot;)\r\n  Set d = CreateObject(&quot;htmlfile&quot;)\r\n  Set elm = d.createElement(&quot;span&quot;)\r\n  elm.setAttribute &quot;id&quot;, &quot;result&quot;\r\n  d.body.appendChild elm\r\n  d.parentWindow.execScript &quot;document.getElementById('result').innerText = encodeURIComponent('&quot; &amp; str &amp; &quot;');&quot;\r\n  EncodeURL = elm.innerText\r\nEnd Function<\/pre>\n<p>\u4e0a\u8a18\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001Internet Explorer\u304c\u8868\u793a\u3055\u308c\u3001\u8a8d\u8a3c\u3068API\u306e\u547c\u3073\u51fa\u3057\u304c\u554f\u984c\u306a\u304f\u884c\u308f\u308c\u308c\u3070\u3001\u30a4\u30df\u30c7\u30a3\u30a8\u30a4\u30c8 \u30a6\u30a3\u30f3\u30c9\u30a6\u306b\u6307\u5b9a\u3057\u305f\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u30b7\u30fc\u30c8\u540d\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_03.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_03.jpg\" alt=\"GoogleAppsScriptExecutionAPI_fromVBA_03\" width=\"600\" height=\"499\" class=\"alignnone size-full wp-image-6418\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_03.jpg 600w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_03-300x250.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_04.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_04.jpg\" alt=\"GoogleAppsScriptExecutionAPI_fromVBA_04\" width=\"600\" height=\"499\" class=\"alignnone size-full wp-image-6419\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_04.jpg 600w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_04-300x250.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_05.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_05.jpg\" alt=\"GoogleAppsScriptExecutionAPI_fromVBA_05\" width=\"600\" height=\"499\" class=\"alignnone size-full wp-image-6420\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_05.jpg 600w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_05-300x250.jpg 300w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_06.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_06.jpg\" alt=\"GoogleAppsScriptExecutionAPI_fromVBA_06\" width=\"416\" height=\"430\" class=\"alignnone size-full wp-image-6421\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_06.jpg 416w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/GoogleAppsScriptExecutionAPI_fromVBA_06-290x300.jpg 290w\" sizes=\"auto, (max-width: 416px) 100vw, 416px\" \/><\/a><\/p>\n<p>\u3053\u308c\u3067\u3088\u3046\u3084\u304f\u3001VBA\u304b\u3089Google Apps Script Execution API\u3092\u547c\u3073\u51fa\u305b\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3057\u305f\u3002<br \/>\n\u5916\u90e8\u304b\u3089GAS\u95a2\u6570\u3092\u547c\u3073\u51fa\u305b\u308b\u30e1\u30ea\u30c3\u30c8\u306f\u3068\u3066\u3082\u591a\u304f\u3001\u300c<a href=\"http:\/\/googledevjp.blogspot.jp\/2015\/11\/api-apps-script.html\" title=\"Execution API \u3067\u3069\u3053\u304b\u3089\u3067\u3082 Apps Script \u30b3\u30fc\u30c9\u304c\u5b9f\u884c\u53ef\u80fd\u306b - Google Developer Japan Blog\" target=\"_blank\" rel=\"noopener\">Execution API \u3067\u3069\u3053\u304b\u3089\u3067\u3082 Apps Script \u30b3\u30fc\u30c9\u304c\u5b9f\u884c\u53ef\u80fd\u306b &#8211; Google Developer Japan Blog<\/a>\u300d\u306b\u3082\u4e0b\u8a18\u306e\u3088\u3046\u306a\u8a18\u8ff0\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<blockquote><p>Execution API \u306f\u3001Microsoft Office (\u3068 VBA) \u304b\u3089 Apps (\u3068 Apps Script) \u3078\u300c\u5f90\u3005\u306b\u79fb\u884c\u300d\u3059\u308b\u3053\u3068\u3092\u5b9f\u73fe\u3059\u308b\u512a\u308c\u305f\u30c4\u30fc\u30eb\u3067\u3059\u3002Office \u306e\u6210\u719f\u3057\u305f\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306b\u306f\u3001VBA \u3067\u69cb\u6210\u3055\u308c\u3066\u3044\u308b\u591a\u304f\u306e\u30d7\u30ed\u30bb\u30b9\u304c\u542b\u307e\u308c\u3066\u304a\u308a\u3001\u3055\u307e\u3056\u307e\u306a\u5834\u6240\u306e\u3055\u307e\u3056\u307e\u306a\u5f62\u5f0f\u306e\u30c7\u30fc\u30bf\u3092\u6271\u3046\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u7279\u306b\u3001\u591a\u304f\u306e\u8981\u7d20\u304c\u79fb\u52d5\u3059\u308b\u81ea\u52d5\u5316\u3055\u308c\u305f\u30d7\u30ed\u30bb\u30b9\u3067\u306f\u30011 \u3064\u306e\u624b\u9806\u3067\u30ef\u30fc\u30af\u30ed\u30fc\u30c9\u5168\u4f53\u3092\u52d5\u304b\u3059\u3053\u3068\u304c\u96e3\u3057\u304f\u306a\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002\u3053\u306e\u65b0\u3057\u3044\u6a5f\u80fd\u3092\u4f7f\u7528\u3059\u308b\u3068\u3001\u7ba1\u7406\u53ef\u80fd\u306a\u898f\u6a21\u3067\u30c7\u30fc\u30bf\u3068\u30d7\u30ed\u30bb\u30b9\u306e\u79fb\u884c\u304c\u884c\u3048\u307e\u3059<\/p><\/blockquote>\n<p>\u4e0a\u8a18\u30b3\u30e1\u30f3\u30c8\u3092\u3057\u3066\u3044\u308bGoogle Developer Expert\u306eBruce Mcpherson\u6c0f\u306f\u3001\u6b63\u76f4\u300c<strong>\u3053\u3053\u307e\u3067VBA\u3067\u3084\u308b\u304b\uff1f<\/strong>\u300d\u3068\u3044\u3046\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3092<a href=\"https:\/\/github.com\/brucemcpherson\/executionapi\" title=\"executionapi\" target=\"_blank\" rel=\"noopener\">GitHub<\/a>\u306b\u8f09\u305b\u3066\u3044\u307e\u3059(<a href=\"http:\/\/ramblings.mcpher.com\/Home\/excelquirks\/goinggas\/exap\" title=\"Execution API and Office to Apps migration - Desktop Liberation\" target=\"_blank\" rel=\"noopener\">Execution API and Office to Apps migration<\/a> \u53c2\u7167)\u3002<br \/>\nVBA\u3068Google API\u306e\u9023\u643a\u3092\u3059\u308b\u4e0a\u3067\u975e\u5e38\u306b\u53c2\u8003\u306b\u306a\u308b\u30b3\u30fc\u30c9\u3067\u3059\u306e\u3067\u3001\u8208\u5473\u304c\u3042\u308b\u65b9\u306f\u662f\u975e\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30b3\u30fc\u30c9\u3092\u898b\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u30fb\u30fb\u30fb\u3061\u306a\u307f\u306b\u3001\u4eca\u56de\u306e\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u306b\u5f53\u305f\u308a\u3001\u8a8d\u8a3c\u5468\u308a\u3067\u304b\u306a\u308a\u3064\u307e\u3065\u304d\u307e\u3057\u305f\u3002<br \/>\n\u3082\u3057API\u306e\u547c\u3073\u51fa\u3057\u3067\u4e0a\u624b\u304f\u3044\u304b\u306a\u3044\u3088\u3046\u3067\u3042\u308c\u3070\u3001\u300c<span style=\"color: #ff0000; font-weight: bold;\">\u30b9\u30af\u30ea\u30d7\u30c8\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u308b\u30e6\u30fc\u30b6\u30fc<\/span>\u300d\u3068\u300c<span style=\"color: #ff0000; font-weight: bold;\">devMode<\/span>\u300d\u306e\u7d44\u307f\u5408\u308f\u305b\u3092\u8272\u3005\u5909\u66f4\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002\u79c1\u306f\u305d\u308c\u3067\u4e0a\u624b\u304f\u3044\u304f\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u300cGoogle Apps Script Execution API\u3092\u8a66\u3057\u3066\u307f\u305f\u3002\u300d\u8a18\u4e8b\u3092\u66f8\u3044\u3066\u304b\u3089\u3072\u3068\u6708\u7d4c\u3063\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u304c\u3001\u3088\u3046\u3084\u304f\u6642\u9593\u304c\u3068\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u306e\u3067\u3001\u5f53\u521d\u306e\u76ee\u7684\u3067\u3042\u3063\u305f\u201cVBA\u304b\u3089Google Apps S [&hellip;]","protected":false},"author":1,"featured_media":7111,"comment_status":"open","ping_status":"closed","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":[4,48,49,58,126],"tags":[],"class_list":["post-6415","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-excel-office","category-word-office","category-powerpoint","category-google"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Excel.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-1Ft","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6415","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=6415"}],"version-history":[{"count":3,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6415\/revisions"}],"predecessor-version":[{"id":14213,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6415\/revisions\/14213"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7111"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}