{"id":607,"date":"2020-03-16T08:35:32","date_gmt":"2020-03-15T23:35:32","guid":{"rendered":"https:\/\/auto-worker.com\/blog\/?p=607"},"modified":"2020-03-20T10:45:01","modified_gmt":"2020-03-20T01:45:01","slug":"post-607","status":"publish","type":"post","link":"https:\/\/auto-worker.com\/blog\/?p=607","title":{"rendered":"Google Apps Script(GAS)\u5165\u9580 \u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u53d6\u5f97\u30fb\u8aad\u307f\u8fbc\u30803\u7a2e\u985e\u306e\u65b9\u6cd5\u3092\u89e3\u8aac"},"content":{"rendered":"<p>Google Apps Script(GAS)\u3067\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u3080\u65b9\u6cd5\u306b\u306f3\u3064\u306e\u65b9\u6cd5\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5404\u3005\u306e\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u53d6\u5f97\u30e1\u30bd\u30c3\u30c9\u306e\u89e3\u8aac\u3068\u3001\u30e1\u30ea\u30c3\u30c8\u30fb\u30c7\u30e1\u30ea\u30c3\u30c8\u3082\u4f75\u305b\u3066\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h2>GAS\u306f\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u30b1\u30fc\u30b9\u591a\u6570<\/h2>\n<p>Google Apps Script(GAS)\u306fGoogle\u306e\u5404\u7a2e\u30b5\u30fc\u30d3\u30b9\u306e\u4e2d\u3067\u6700\u3082\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u5229\u7528\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306f\u30de\u30a4\u30af\u30ed\u30bd\u30d5\u30c8\u30fb\u30aa\u30d5\u30a3\u30b9\u3067\u8a00\u3046\u3068\u3053\u308d\u306e\u30a8\u30af\u30bb\u30eb\u3067\u3042\u308a\u3001GAS\u306f\u30de\u30af\u30ed(VBA)\u3067\u3042\u308b\u3068\u8a00\u3048\u307e\u3059\u3002<\/p>\n<p>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u304c\u8868\u8a08\u7b97\u30c4\u30fc\u30eb\u3068\u3057\u3066\u6301\u3064\u8a08\u7b97\u3084\u95a2\u6570\u3060\u3051\u3067\u306f\u5b9f\u73fe\u3067\u304d\u306a\u3044\u51e6\u7406\u3092\u3001GAS\u306e\u30b3\u30fc\u30c9\u3092\u8a18\u8ff0\u3057\u3066\u5b9f\u73fe\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001\u4ed6\u306eGoogle\u30b5\u30fc\u30d3\u30b9\u3088\u308a\u3082\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3067GAS\u304c\u6d3b\u7528\u3055\u308c\u308b\u4e8b\u4f8b\u304c\u30cd\u30c3\u30c8\u4e0a\u306b\u3082\u591a\u6570\u63b2\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>SpreadsheetApp\u30af\u30e9\u30b9\u3067\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u64cd\u4f5c<\/h2>\n<p>Google Apps Script\u3067\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u6271\u3046\u969b\u306b\u306f\u3001SpreadsheetApp\u30af\u30e9\u30b9\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-636\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_005.jpg\" alt=\"Google Apps Script\u3068\u76f8\u6027\u304c\u3088\u3044\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\" width=\"400\" height=\"299\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_005.jpg 400w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_005-300x224.jpg 300w\" sizes=\"auto, (max-width: 400px) 100vw, 400px\" \/><\/p>\n<p>SpreadsheetApp\u30af\u30e9\u30b9\u306f\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u60c5\u5831\u3092\u53d6\u5f97\u3057\u305f\u308a\u3001\u64cd\u4f5c\u3057\u305f\u308a\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u30e1\u30bd\u30c3\u30c9\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306eSpreadsheetApp\u3067\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001GAS\u4e0a\u3067\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u307f\u3001\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3057\u305f\u308a\u3001\u66f8\u304d\u8fbc\u3093\u3060\u308a\u3068\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u64cd\u4f5c\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h2>Google Apps Script\u3067\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u30803\u3064\u306e\u30e1\u30bd\u30c3\u30c9<\/h2>\n<p>GAS\u3067\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u3080\u969b\u306b\u306f\u4ee5\u4e0b\u306e3\u3064\u306e\u30e1\u30bd\u30c3\u30c9\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<ol>\n<li>getActiveSpreadsheet()<\/li>\n<li>openbyId(id)<\/li>\n<li>openbyUrl(url)<\/li>\n<\/ol>\n<p>\u305d\u308c\u305e\u308c\u306e\u8aad\u307f\u8fbc\u3080\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u3066\u304d\u307e\u3059\u3002<\/p>\n<h3>getActiveSpreadsheet()<\/h3>\n<p>getActiveSpreadshhet()\u306f\u73fe\u5728\u3001\u958b\u3044\u3066\u3044\u308b\u30a2\u30af\u30c6\u30a3\u30d6\u306a\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u3080\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002<\/p>\n<p><code>  let activeSheet = SpreadsheetApp.getActiveSheet();<\/code><\/p>\n<p>\u3053\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u7d10\u3065\u304f\u30b3\u30f3\u30c6\u30ca\u30d0\u30a4\u30f3\u30c9\u578b\u306eGAS\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3057\u304b\u5229\u7528\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<p>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u7d10\u4ed8\u3044\u3066\u3044\u308b\u305f\u3081\u3001\u7279\u306b\u5f15\u6570\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u306a\u304f\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Google Apps Script\u3092\u5229\u7528\u3059\u308b\u591a\u304f\u306e\u5834\u5408\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u7d10\u4ed8\u3044\u305f\u30b3\u30f3\u30c6\u30ca\u30d0\u30a4\u30f3\u30c9\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u305f\u3081\u3001\u6700\u3082\u7c21\u5358\u306b\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u304c\u30e1\u30ea\u30c3\u30c8\u3067\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001\u305d\u306e\u4ee3\u308f\u308a\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u7d10\u4ed8\u304b\u306a\u3044\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u578b\u306eGAS\u3067\u306fgetActiveSpreadsheet()\u30e1\u30bd\u30c3\u30c9\u306f\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n<h3>openbyId(id)<\/h3>\n<p>openbyId(id)\u306f\u5f15\u6570\u306b\u6307\u5b9a\u3057\u305fid\u304b\u3089\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<p>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u30d6\u30e9\u30a6\u30b6\u3067\u958b\u304f\u3068\u3001URL\u6b04\u306b\u306f\u4e0b\u56f3\u306e\u3088\u3046\u306a\u6587\u5b57\u5217\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-632\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_001.jpg\" alt=\"\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u958b\u3044\u305fURL\u6b04\u306b\u306f\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306eID\u304c\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b\" width=\"600\" height=\"385\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_001.jpg 600w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_001-300x193.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_001-530x340.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_001-565x363.jpg 565w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>\u3053\u306e\u8d64\u67a0\u3067\u56f2\u307e\u308c\u305f\u90e8\u5206\u304c\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306eID\u3067\u3001\u4e16\u754c\u4e2d\u306e\u4eba\u304c\u5229\u7528\u3057\u3066\u3044\u308bGoogle\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u4e2d\u3067\u30e6\u30cb\u30fc\u30af(\u552f\u4e00)\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><code>let idSheet = SpreadsheetApp.openById(\"\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306eid\u203b\u82f1\u6570\u5b57\");<\/code><\/p>\n<p>\u3053\u306e\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306eID\u3092\u5f15\u6570\u306b\u3057\u3066\u3001openbyId\u30e1\u30bd\u30c3\u30c9\u3067\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>openbyId\u30e1\u30bd\u30c3\u30c9\u306f\u30b3\u30f3\u30c6\u30ca\u30d0\u30a4\u30f3\u30c9\u3067\u3082\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u306e\u3069\u3061\u3089\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3082\u5b9f\u884c\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<h3>openbyUrl(url)<\/h3>\n<p>openbyUrl(url)\u306f\u5f15\u6570\u306b\u6307\u5b9a\u3057\u305furl\u304b\u3089\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<p>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u30d6\u30e9\u30a6\u30b6\u3067\u958b\u304f\u3068\u3001URL\u6b04\u306b\u306f\u4e0b\u56f3\u306e\u3088\u3046\u306a\u6587\u5b57\u5217\u304c\u8868\u793a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-633\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_002.jpg\" alt=\"\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306eURL\u3092\u78ba\u8a8d\u3057\u3001openbyUrl\u30e1\u30bd\u30c3\u30c9\u306e\u5f15\u6570\u306b\u6307\u5b9a\u3059\u308b\" width=\"600\" height=\"412\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_002.jpg 600w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_002-300x206.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_002-530x364.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_002-565x388.jpg 565w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p>https\u304b\u3089\u59cb\u307e\u308bURL\u3092\u5f15\u6570\u306b\u3057\u3066GAS\u3067\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<p><code>let urlSheet = SpreadsheetApp.openByUrl(\"https:\/\/docs.google.com\/spreadsheets\/d\/\u3010\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306eID\u3011\/edit#gid=0\");<\/code><\/p>\n<p>openbyId\u3068\u540c\u69d8\u306b\u30b3\u30f3\u30c6\u30ca\u30d0\u30a4\u30f3\u30c9\u3067\u3082\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u3067\u3082\u5229\u7528\u53ef\u80fd\u306a\u30e1\u30bd\u30c3\u30c9\u3067\u3059\u3002<\/p>\n<p>openbyUrl\u306e\u30c7\u30e1\u30ea\u30c3\u30c8\u3068\u3057\u3066\u3001openbyId\u3088\u308a\u3082\u5f15\u6570\u306e\u6587\u5b57\u6570\u304c\u591a\u3044\u305f\u3081\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u53ef\u8aad\u6027\u304c\u4e0b\u304c\u308b\u70b9\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30b3\u30f3\u30c6\u30ca\u30d0\u30a4\u30f3\u30c9\u3068\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u3067\u4f7f\u3044\u5206\u3051<\/h2>\n<p>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u30803\u3064\u306e\u65b9\u6cd5\u306e\u4f7f\u3044\u5206\u3051\u65b9\u6cd5\u3068\u3057\u3066\u306f\u3001GAS\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u30b3\u30f3\u30c6\u30ca\u30d0\u30a4\u30f3\u30c9\u304b\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u304b\u3067\u4f7f\u3044\u5206\u3051\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-634\" src=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_003.jpg\" alt=\"\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u3080Google Apps Script(GAS)\u306e3\u3064\u306e\u30e1\u30bd\u30c3\u30c9\" width=\"843\" height=\"305\" srcset=\"https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_003.jpg 843w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_003-300x109.jpg 300w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_003-768x278.jpg 768w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_003-530x192.jpg 530w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_003-565x204.jpg 565w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_003-710x257.jpg 710w, https:\/\/auto-worker.com\/blog\/wp-content\/uploads\/2020\/03\/20200316_auto_003-725x262.jpg 725w\" sizes=\"auto, (max-width: 843px) 100vw, 843px\" \/><\/p>\n<p>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u753b\u9762\u304b\u3089\u30b9\u30af\u30ea\u30d7\u30c8\u30a8\u30c7\u30a3\u30bf\u3092\u958b\u304f\u30b3\u30f3\u30c6\u30ca\u30d0\u30a4\u30f3\u30c9\u578b\u306e\u5834\u5408\u306f\u3001getActiveSpreadsheet\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>\u203b\u30b3\u30f3\u30c6\u30ca\u30d0\u30a4\u30f3\u30c9\u3067\u3082\u7d10\u4ed8\u304b\u306a\u3044\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u307f\u305f\u3044\u5834\u5408\u306f\u3001\u4ed6\u306e\uff12\u3064\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n<p>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u7d10\u4ed8\u304b\u306a\u3044\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u578bGAS\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u306f\u3001getActiveSpreadsheet\u304c\u4f7f\u7528\u4e0d\u53ef\u306a\u306e\u3067\u3001openbyId\u304bopenbyUrl\u306e\u3069\u3061\u3089\u304b\u3092\u5229\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>openbyId\u3068openbyUrl\u306f\u5f15\u6570\u306b\u6307\u5b9a\u3059\u308b\u306e\u304c\u3001\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306eID\u304bURL\u304b\u306e\u9055\u3044\u3057\u304b\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u305f\u3060\u3001URL\u3088\u308a\u3082ID\u306e\u307b\u3046\u304c\u30b7\u30f3\u30d7\u30eb\u3067\u3042\u308b\u3053\u3068\u306b\u52a0\u3048\u3001GoogleDrive\u3068\u3057\u3066\u306e1\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u958b\u304f\u5834\u5408\u306b\u306fID\u6307\u5b9a\u3067\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<p>\u305d\u3046\u3057\u305f\u8aad\u307f\u8fbc\u307f\u65b9\u5f0f\u3092\u7d71\u4e00\u3057\u3066\u30b3\u30fc\u30c9\u306e\u53ef\u8aad\u6027\u3092\u4e0a\u3052\u308b\u3053\u3068\u3092\u8003\u616e\u3059\u308b\u3068\u3001openbyId\u3092\u5229\u7528\u3059\u308b\u306e\u304c\u30aa\u30b9\u30b9\u30e1\u3067\u3059\u3002<\/p>\n<h2>\u307e\u3068\u3081\u30fb\u7d42\u308f\u308a\u306b<\/h2>\n<p>\u4eca\u56de\u3001Google Apps Script(GAS)\u3067\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u3080\u969b\u306b\u3001SpreadsheetApp\u30af\u30e9\u30b9\u306e3\u3064\u306e\u30e1\u30bd\u30c3\u30c9\u3067\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u7d10\u3065\u304f\u30b3\u30f3\u30c6\u30ca\u30d0\u30a4\u30f3\u30c9\u578b\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5834\u5408\u306f\u3001getActiveSpreadsheet()\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u306e\u304c\u30aa\u30b9\u30b9\u30e1\u3067\u3059\u3002<\/p>\n<p>\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u7d10\u4ed8\u304b\u306a\u3044\u30b9\u30bf\u30f3\u30c9\u30a2\u30ed\u30f3\u578b\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u5834\u5408\u306f\u3001openbyId(id)\u3068openbyUrl(url)\u3092\u5229\u7528\u3067\u304d\u307e\u3059\u304c\u3001\u3088\u308a\u5c11\u306a\u3044\u8a18\u8ff0\u3067\u30b3\u30fc\u30c9\u304c\u66f8\u3051\u308bopenbyId(id)\u304c\u30aa\u30b9\u30b9\u30e1\u3067\u3059\u3002<\/p>\n<p>Google Apps Script\u3067\u306f\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3067\u5229\u7528\u3059\u308b\u30b1\u30fc\u30b9\u304c\u6700\u3082\u591a\u3044\u3067\u3059\u3002<\/p>\n<p>\u305c\u3072\u3001\u305d\u308c\u305e\u308c\u306e\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u3080\u30e1\u30bd\u30c3\u30c9\u306e\u9055\u3044\u3092\u7406\u89e3\u3057\u3066\u3001GAS\u3067\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u64cd\u4f5c\u3092\u884c\u3044\u307e\u3057\u3087\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google Apps Script(GAS)\u3067\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u8aad\u307f\u8fbc\u3080\u65b9\u6cd5\u306b\u306f3\u3064\u306e\u65b9\u6cd5\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002 \u5404\u3005\u306e\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u53d6\u5f97\u30e1\u30bd\u30c3\u30c9\u306e\u89e3\u8aac\u3068\u3001\u30e1\u30ea\u30c3\u30c8\u30fb\u30c7\u30e1\u30ea\u30c3\u30c8\u3082\u4f75\u305b\u3066\u7d39\u4ecb\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002 GAS\u306f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":635,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[14,196,197,198,64,137,195],"class_list":["post-607","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gas","tag-gas","tag-getactivespreadsheet","tag-openbyid","tag-openbyurl","tag-64","tag-137","tag-195"],"_links":{"self":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/607","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=607"}],"version-history":[{"count":5,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/607\/revisions"}],"predecessor-version":[{"id":656,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/607\/revisions\/656"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/635"}],"wp:attachment":[{"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/auto-worker.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}