{"id":23025,"date":"2026-01-18T11:52:51","date_gmt":"2026-01-18T02:52:51","guid":{"rendered":"https:\/\/cg-method.com\/google\/?p=23025"},"modified":"2026-10-28T22:01:19","modified_gmt":"2026-10-28T13:01:19","slug":"google-sheets-delete-sheets","status":"publish","type":"post","link":"https:\/\/cg-method.com\/google\/google-sheets-delete-sheets\/","title":{"rendered":"Google\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u2502\u4e0d\u8981\u306a\u30b7\u30fc\u30c8\u3092\u4e00\u62ec\u524a\u9664\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u6b8b\u3059\u30b7\u30fc\u30c8\u540d\u3092\u6307\u5b9a\u3057\u3001\u305d\u308c\u4ee5\u5916\u306e\u30b7\u30fc\u30c8\u3092GAS\u3067\u524a\u9664\u3059\u308b\u624b\u9806\u3067\u3059\u3002\u524a\u9664\u524d\u306b\u5bfe\u8c61\u4e00\u89a7\u3092\u4e0b\u898b\u3057\u3001\u5b9f\u884c\u6642\u306f\u30d5\u30a1\u30a4\u30eb\u5168\u4f53\u306e\u30b3\u30d4\u30fc\u3092\u4f5c\u3063\u3066\u304b\u3089\u524a\u9664\u3057\u307e\u3059\u3002\u6700\u521d\u306f\u672c\u756a\u30d5\u30a1\u30a4\u30eb\u3092\u8907\u88fd\u3057\u305f\u7df4\u7fd2\u7528\u30d5\u30a1\u30a4\u30eb\u3067\u8a66\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u6b8b\u3059\u30b7\u30fc\u30c8\u540d\u3068\u53c2\u7167\u95a2\u4fc2\u3092\u78ba\u8a8d\u3059\u308b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">keepSheets\u306b\u6b8b\u3059\u30b7\u30fc\u30c8\u306e\u540d\u524d\u3092\u3059\u3079\u3066\u6307\u5b9a\u3057\u307e\u3059\u3002\u5927\u6587\u5b57\u5c0f\u6587\u5b57\u3084\u7a7a\u767d\u3082\u542b\u3081\u305f\u5b8c\u5168\u4e00\u81f4\u3067\u3059\u3002\u3053\u306e\u4fee\u6b63\u7248\u306f\u6307\u5b9a\u540d\u304c1\u3064\u3067\u3082\u5b58\u5728\u3057\u306a\u3051\u308c\u3070\u505c\u6b62\u3057\u3001\u8868\u793a\u4e2d\u306e\u30b7\u30fc\u30c8\u3092\u6700\u4f4e1\u679a\u6b8b\u3059\u3088\u3046\u78ba\u8a8d\u3057\u307e\u3059\u3002\u914d\u5217\u306b\u66f8\u304d\u5fd8\u308c\u305f\u30b7\u30fc\u30c8\u306f\u524a\u9664\u5bfe\u8c61\u306a\u306e\u3067\u3001\u4e0b\u898b\u4e00\u89a7\u3092\u5fc5\u305a\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u975e\u8868\u793a\u30b7\u30fc\u30c8\u3082\u5bfe\u8c61\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b8b\u3059\u30b7\u30fc\u30c8\u306e\u6570\u5f0f\u30fb\u30b0\u30e9\u30d5\u30fb\u540d\u524d\u4ed8\u304d\u7bc4\u56f2\u306a\u3069\u304c\u524a\u9664\u5bfe\u8c61\u3092\u53c2\u7167\u3057\u3066\u3044\u308b\u3068\u3001\u524a\u9664\u5f8c\u306b\u58ca\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u30b3\u30fc\u30c9\u306f\u53c2\u7167\u95a2\u4fc2\u3092\u89e3\u6790\u3057\u307e\u305b\u3093\u3002\u5fc5\u8981\u6027\u3092\u540d\u524d\u3060\u3051\u3067\u5224\u65ad\u305b\u305a\u3001\u5171\u540c\u7de8\u96c6\u3084\u4ed6\u306e\u81ea\u52d5\u51e6\u7406\u3092\u6b62\u3081\u3066\u78ba\u8a8d\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e0b\u898b\u3068\u524a\u9664\u3092\u5206\u3051\u305fGAS\u30b3\u30fc\u30c9<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u7df4\u7fd2\u7528\u30d5\u30a1\u30a4\u30eb\u306e\u300c\u62e1\u5f35\u6a5f\u80fd\u300d\u2192\u300cApps Script\u300d\u3067\u30b3\u30fc\u30c9\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002spreadsheetId\u306b\u30b3\u30d4\u30fc\u306eURL\u306e\/d\/\u3068\/edit\u306e\u9593\u306eID\u3092\u8a2d\u5b9a\u3057\u3001keepSheets\u3092\u5b9f\u969b\u306e\u540d\u524d\u3078\u5909\u66f4\u3057\u307e\u3059\u3002\u307e\u305apreviewDeleteSheets\u3060\u3051\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002\u3053\u306e\u95a2\u6570\u306f\u524a\u9664\u305b\u305a\u3001\u73fe\u5728\u306e\u30a2\u30ab\u30a6\u30f3\u30c8\u306e\u30e6\u30fc\u30b6\u30fc\u30d7\u30ed\u30d1\u30c6\u30a3\u3078\u8a08\u753b\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-js\" data-lang=\"JavaScript\"><code>const DELETE_DEMO = {spreadsheetId:&#x27;COPY_SPREADSHEET_ID&#x27;,keepSheets:[&#x27;\u52e4\u6020&#x27;,&#x27;\u5171\u901a&#x27;,&#x27;\u540d\u7c3f&#x27;]};\nconst DELETE_PLAN_KEY = &#x27;deleteSheetPreviewV1&#x27;;\nfunction sheetDeletePlan_() {\n  const ss=SpreadsheetApp.openById(DELETE_DEMO.spreadsheetId), sheets=ss.getSheets();\n  const keep=DELETE_DEMO.keepSheets;\n  if(!keep.length || new Set(keep).size!==keep.length)throw new Error(&#x27;\u6b8b\u3059\u540d\u524d\u3092\u91cd\u8907\u306a\u3057\u3067\u6307\u5b9a\u3057\u3066\u304f\u3060\u3055\u3044&#x27;);\n  if(sheets.length&gt;50)throw new Error(&#x27;\u7df4\u7fd2\u306f50\u30b7\u30fc\u30c8\u4ee5\u5185\u3067\u3059&#x27;);\n  const state=sheets.map(s=&gt;({id:s.getSheetId(),name:s.getName(),hidden:s.isSheetHidden()}));\n  if(keep.some(n=&gt;!state.some(s=&gt;s.name===n)))throw new Error(&#x27;\u6b8b\u3059\u30b7\u30fc\u30c8\u540d\u306b\u5b58\u5728\u3057\u306a\u3044\u540d\u524d\u304c\u3042\u308a\u307e\u3059&#x27;);\n  if(!state.some(s=&gt;keep.includes(s.name)&amp;&amp;!s.hidden))throw new Error(&#x27;\u8868\u793a\u4e2d\u306e\u30b7\u30fc\u30c8\u3092\u6700\u4f4e1\u679a\u6b8b\u3057\u3066\u304f\u3060\u3055\u3044&#x27;);\n  return {spreadsheetId:ss.getId(),keep:keep.slice(),state,remove:state.filter(s=&gt;!keep.includes(s.name))};\n}\nfunction previewDeleteSheets() {\n  const plan=sheetDeletePlan_(), text=JSON.stringify(plan);\n  if(Utilities.newBlob(text).getBytes().length&gt;8000)throw new Error(&#x27;\u8a08\u753b\u304c\u5927\u304d\u3059\u304e\u307e\u3059&#x27;);\n  PropertiesService.getUserProperties().setProperty(DELETE_PLAN_KEY,text);\n  console.log(&#x27;\u524a\u9664\u4e88\u5b9a\uff08\u307e\u3060\u524a\u9664\u3057\u307e\u305b\u3093\uff09\uff1a&#x27;+JSON.stringify(plan.remove));\n  console.log(&#x27;\u6b8b\u3059\u30b7\u30fc\u30c8\uff1a&#x27;+JSON.stringify(plan.keep));\n}\nfunction deleteExcludedSheets() {\n  const lock=LockService.getScriptLock();\n  if(!lock.tryLock(1000))throw new Error(&#x27;\u5225\u306e\u51e6\u7406\u304c\u5b9f\u884c\u4e2d\u3067\u3059&#x27;);\n  let completedCount=null;\n  try {\n    const props=PropertiesService.getUserProperties(),saved=props.getProperty(DELETE_PLAN_KEY);\n    if(!saved)throw new Error(&#x27;\u540c\u3058\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u5148\u306bpreviewDeleteSheets\u3092\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044&#x27;);\n    const plan=sheetDeletePlan_();\n    if(saved!==JSON.stringify(plan))throw new Error(&#x27;\u8a2d\u5b9a\u3084\u30b7\u30fc\u30c8\u69cb\u6210\u304c\u5909\u308f\u308a\u307e\u3057\u305f\u3002\u518d\u5ea6\u4e0b\u898b\u3057\u3066\u304f\u3060\u3055\u3044&#x27;);\n    if(!plan.remove.length){console.log(&#x27;\u524a\u9664\u5bfe\u8c61\u306a\u3057&#x27;);return;}\n    const backup=DriveApp.getFileById(plan.spreadsheetId).makeCopy(&#x27;\u30b7\u30fc\u30c8\u524a\u9664\u524d_&#x27;+Utilities.getUuid());\n    console.log(&#x27;\u30d0\u30c3\u30af\u30a2\u30c3\u30d7URL\uff1a&#x27;+backup.getUrl());\n    if(saved!==JSON.stringify(sheetDeletePlan_()))throw new Error(&#x27;\u30b3\u30d4\u30fc\u4e2d\u306b\u30b7\u30fc\u30c8\u69cb\u6210\u304c\u5909\u308f\u308a\u307e\u3057\u305f&#x27;);\n    props.deleteProperty(DELETE_PLAN_KEY);\n    const ss=SpreadsheetApp.openById(plan.spreadsheetId),done=[];\n    try {\n      for(const item of plan.remove){\n        const sheet=ss.getSheetById(item.id);\n        if(!sheet || sheet.getName()!==item.name)throw new Error(&#x27;\u524a\u9664\u5bfe\u8c61\u304c\u5909\u66f4\u3055\u308c\u307e\u3057\u305f&#x27;);\n        ss.deleteSheet(sheet);done.push(item);\n      }\n    } catch(error) {\n      console.log(&#x27;\u524a\u9664\u547c\u3073\u51fa\u3057\u304c\u6b63\u5e38\u7d42\u4e86\u3057\u305f\u5bfe\u8c61\uff08\u5168\u524a\u9664\u7d50\u679c\u3068\u306f\u9650\u308a\u307e\u305b\u3093\uff09\uff1a&#x27;+JSON.stringify(done));\n      throw new Error(&#x27;\u9014\u4e2d\u505c\u6b62\u3002\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3068\u73fe\u5728\u306e\u72b6\u614b\u3092\u7167\u5408\u3057\u3066\u304f\u3060\u3055\u3044&#x27;);\n    }\n    completedCount=done.length;\n  } finally {\n    try {SpreadsheetApp.flush();}\n    finally {lock.releaseLock();}\n  }\n  console.log(&#x27;\u524a\u9664\u51e6\u7406\u7d42\u4e86\uff1a&#x27;+completedCount+&#x27;\u679a\u3002\u73fe\u5728\u306e\u30b7\u30fc\u30c8\u69cb\u6210\u3068\u53c2\u7167\u5148\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044&#x27;);\n}\n<\/code><\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">\u524a\u9664\u4e88\u5b9a\u3092\u78ba\u8a8d\u3057\u3066\u5b9f\u884c\u3059\u308b<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30ed\u30b0\u306e\u524a\u9664\u4e88\u5b9a\u3068\u6b8b\u3059\u540d\u524d\u30921\u679a\u305a\u3064\u7167\u5408\u3057\u3001\u554f\u984c\u304c\u306a\u3044\u5834\u5408\u3060\u3051deleteExcludedSheets\u3092\u624b\u52d5\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002\u4e0b\u898b\u5f8c\u306b\u30b7\u30fc\u30c8\u306e\u8ffd\u52a0\u30fb\u524a\u9664\u30fb\u6539\u540d\u30fb\u9806\u5e8f\u30fb\u8868\u793a\u72b6\u614b\u30fb\u8a2d\u5b9a\u304c\u5909\u308f\u3063\u305f\u5834\u5408\u306f\u505c\u6b62\u3057\u307e\u3059\u3002\u30bb\u30eb\u5185\u5bb9\u306e\u5909\u5316\u306f\u6bd4\u8f03\u5bfe\u8c61\u3067\u306f\u306a\u3044\u305f\u3081\u3001\u4e0b\u898b\u4e2d\u3082\u5171\u540c\u7de8\u96c6\u3092\u6b62\u3081\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u524a\u9664\u5b9f\u884c\u306b\u306f\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u7de8\u96c6\u3068Drive\u306e\u30b3\u30d4\u30fc\u4f5c\u6210\u306e\u6a29\u9650\u304c\u5fc5\u8981\u3067\u3059\u3002\u6a29\u9650\u306e\u8981\u6c42\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30d5\u30a1\u30a4\u30eb\u5168\u4f53\u306e\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u3092\u4f5c\u308c\u306a\u3051\u308c\u3070\u524a\u9664\u3057\u307e\u305b\u3093\u3002\u30b3\u30d4\u30fc\u306f\u30de\u30a4\u30c9\u30e9\u30a4\u30d6\u3067\u78ba\u8a8d\u3057\u3001\u30ed\u30b0\u306b\u51fa\u305f\u30d0\u30c3\u30af\u30a2\u30c3\u30d7URL\u3092\u4fdd\u5b58\u3057\u307e\u3059\u3002\u30b3\u30d4\u30fc\u306e\u5171\u6709\u8a2d\u5b9a\u304c\u5143\u3068\u540c\u3058\u3068\u306f\u9650\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u524a\u9664\u51e6\u7406\u306f\u4e00\u62ec\u3067\u53d6\u308a\u6d88\u305b\u307e\u305b\u3093\u3002\u9014\u4e2d\u505c\u6b62\u3057\u305f\u5834\u5408\u306f\u3001\u4e0b\u898b\u30ed\u30b0\u306b\u3042\u308b\u524a\u9664\u4e88\u5b9a\u306e\u5168\u30b7\u30fc\u30c8ID\u30fb\u540d\u524d\u3092\u73fe\u5728\u306e\u69cb\u6210\u3068\u7167\u5408\u3057\u3001\u3059\u3050\u306b\u518d\u5b9f\u884c\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002\u524a\u9664\u547c\u3073\u51fa\u3057\u306e\u76f4\u5f8c\u306b\u505c\u6b62\u3059\u308b\u3068\u3001\u524a\u9664\u3055\u308c\u305f\u30b7\u30fc\u30c8\u304cdone\u3084\u30a8\u30e9\u30fc\u30ed\u30b0\u306b\u8a18\u9332\u3055\u308c\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u30ed\u30b0\u306b\u8f09\u3063\u305f\u5bfe\u8c61\u3060\u3051\u3092\u5fa9\u65e7\u78ba\u8a8d\u306e\u7bc4\u56f2\u306b\u3057\u306a\u3044\u3067\u304f\u3060\u3055\u3044\u3002\u4fdd\u5b58\u3057\u305f\u8a08\u753b\u306f\u524a\u9664\u958b\u59cb\u524d\u306b\u6d88\u8cbb\u3059\u308b\u305f\u3081\u3001\u518d\u5b9f\u884c\u306b\u306f\u65b0\u305f\u306a\u4e0b\u898b\u304c\u5fc5\u8981\u3067\u3059\u3002\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u4f5c\u6210\u5f8c\u306b\u505c\u6b62\u3057\u305f\u5834\u5408\u306f\u3001\u30b3\u30d4\u30fc\u3060\u3051\u304c\u6b8b\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002\u30ed\u30c3\u30af\u89e3\u653e\u524d\u306eSpreadsheetApp.flush\u306f\u4fdd\u7559\u4e2d\u306e\u5909\u66f4\u3092\u53cd\u6620\u3059\u308b\u51e6\u7406\u3067\u3042\u308a\u3001\u524a\u9664\u3092\u53d6\u308a\u6d88\u3057\u307e\u305b\u3093\u3002\u53cd\u6620\u306b\u5931\u6557\u3057\u3066\u3082\u30ed\u30c3\u30af\u306f\u89e3\u653e\u3057\u3001\u524a\u9664\u51e6\u7406\u7d42\u4e86\u306e\u30ed\u30b0\u306f\u51fa\u3057\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5fa9\u65e7\u3068\u691c\u8a3c\u7bc4\u56f2<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u524a\u9664\u3057\u305f\u30b7\u30fc\u30c8\u306e\u5fa9\u65e7\u306f\u81ea\u52d5\u5316\u3057\u3066\u3044\u307e\u305b\u3093\u3002\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u307e\u305f\u306f\u5909\u66f4\u5c65\u6b74\u3068\u7167\u5408\u3057\u3001\u5f8c\u304b\u3089\u52a0\u3048\u3089\u308c\u305f\u7de8\u96c6\u3092\u5931\u308f\u306a\u3044\u65b9\u6cd5\u3092\u691c\u8a0e\u3057\u307e\u3059\u3002\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u304b\u3089\u30b7\u30fc\u30c8\u3060\u3051\u3092\u623b\u3057\u3066\u3082\u53c2\u7167\u5f0f\u3084\u30b7\u30fc\u30c8ID\u307e\u3067\u5143\u3069\u304a\u308a\u306b\u306a\u308b\u3068\u306f\u9650\u3089\u306a\u3044\u305f\u3081\u3001\u6b8b\u3057\u305f\u30b7\u30fc\u30c8\u306e\u8a08\u7b97\u30fb\u30b0\u30e9\u30d5\u3082\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u30c8\u30ea\u30ac\u30fc\u306f\u4f5c\u6210\u3057\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u516c\u5f0f\u4ed5\u69d8\u306f<a href=\"https:\/\/developers.google.com\/apps-script\/reference\/spreadsheet\/spreadsheet\">Spreadsheet.deleteSheet<\/a>\u3068<a href=\"https:\/\/developers.google.com\/apps-script\/reference\/drive\/file\">File.makeCopy<\/a>\u3001<a href=\"https:\/\/developers.google.com\/apps-script\/reference\/lock\/lock#releaseLock()\">Lock.releaseLock<\/a>\u3092\u53c2\u7167\u3057\u3066\u304f\u3060\u3055\u3044\u30022026\u5e7410\u670828\u65e5\u306e\u78ba\u8a8d\u306f\u30ed\u30fc\u30ab\u30eb\u6a21\u64ec\u30c6\u30b9\u30c8\u3067\u3001\u524a\u9664\u5f8c\u306e\u5fdc\u7b54\u5931\u6557\u6642\u306b\u30ed\u30b0\u304b\u3089\u5bfe\u8c61\u304c\u6f0f\u308c\u308b\u5834\u5408\u3068\u3001\u53cd\u6620\u5931\u6557\u6642\u306e\u30ed\u30c3\u30af\u89e3\u653e\u3092\u542b\u3081\u3001\u540d\u524d\u8aa4\u308a\u30fb\u4e0b\u898b\u306a\u3057\u30fb\u69cb\u6210\u5909\u5316\u30fb\u30b3\u30d4\u30fc\u5931\u6557\u6642\u306e\u505c\u6b62\u3068\u3001\u30d0\u30c3\u30af\u30a2\u30c3\u30d7\u5f8c\u306e\u524a\u9664\u9806\u5e8f\u3092\u691c\u8a3c\u3057\u307e\u3057\u305f\u3002Google\u8a8d\u53ef\u30fb\u5b9f\u524a\u9664\u30fb\u5fa9\u65e7\u30fb\u753b\u9762\u78ba\u8a8d\u306f\u672a\u5b9f\u65bd\u3067\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">ScriptLock\u306f\u540c\u3058\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5185\u306e\u5b9f\u884c\u3060\u3051\u3092\u5236\u5fa1\u3057\u307e\u3059\u3002\u4ed6\u306e\u4eba\u3084\u5225\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u3088\u308b\u540c\u6642\u5909\u66f4\u3092\u5b8c\u5168\u306b\u9632\u3050\u3082\u306e\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u65e2\u5b58\u753b\u50cf\u306f\u65e7\u7248\u53c2\u8003\u3067\u3042\u308a\u3001\u4eca\u56de\u306e\u30b3\u30fc\u30c9\u306e\u5b9f\u884c\u8a3c\u62e0\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"395\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2026\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2026-01-18-11.48.22-1024x395.png\" alt=\"\u4e0a\u90e8\u30e1\u30cb\u30e5\u30fc\u306e\u62e1\u5f35\u6a5f\u80fd\u304b\u3089Apps Script\u3092\u9078\u629e\u3057\u3066\u30a8\u30c7\u30a3\u30bf\u3092\u958b\u304f\u624b\u9806\u3002\" class=\"wp-image-23027\" srcset=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2026\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2026-01-18-11.48.22-1024x395.png 1024w, https:\/\/cg-method.com\/google\/wp-content\/uploads\/2026\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2026-01-18-11.48.22-300x116.png 300w, https:\/\/cg-method.com\/google\/wp-content\/uploads\/2026\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2026-01-18-11.48.22-768x297.png 768w, https:\/\/cg-method.com\/google\/wp-content\/uploads\/2026\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2026-01-18-11.48.22.png 1238w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"715\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2026\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2026-01-18-11.45.52-1024x715.png\" alt=\"\u30a8\u30c7\u30a3\u30bf\u306b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8cbc\u308a\u4ed8\u3051\u3066\u5b9f\u884c\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u64cd\u4f5c\u753b\u9762\u3002\" class=\"wp-image-23026\" srcset=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2026\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2026-01-18-11.45.52-1024x715.png 1024w, https:\/\/cg-method.com\/google\/wp-content\/uploads\/2026\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2026-01-18-11.45.52-300x209.png 300w, https:\/\/cg-method.com\/google\/wp-content\/uploads\/2026\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2026-01-18-11.45.52-768x536.png 768w, https:\/\/cg-method.com\/google\/wp-content\/uploads\/2026\/01\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2026-01-18-11.45.52.png 1424w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u65e7\u7248\u30b3\u30fc\u30c9\u306f<a href=\"https:\/\/github.com\/MOTOKI-LLC\/cg-method-code\/tree\/main\/google\/google-sheets-delete-sheets\">MOTOKI-LLC\/cg-method-code<\/a>\u306b\u3042\u308a\u307e\u3059\u3002\u672c\u6587\u3068\u306e\u540c\u671f\u306f\u672a\u78ba\u8a8d\u306e\u305f\u3081\u3001\u672c\u6587\u306e\u30b3\u30fc\u30c9\u3092\u5358\u72ec\u3067\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2026\/09\/google-apps-matome-3-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/cg-method.com\/google\/google-apps-matome\/\">Google\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u30fb\u30c9\u30e9\u30a4\u30d6\u306e\u4f7f\u3044\u65b9\u307e\u3068\u3081\uff5c\u95a2\u6570\u3068GAS<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Google\u306e\u64cd\u4f5c\u3092\u300c\u4f55\u3092\u3057\u305f\u3044\u304b\u300d\u304b\u3089\u63a2\u305b\u308b\u30ac\u30a4\u30c9\u3067\u3059\u3002 \u307e\u305a\u6a19\u6e96\u306e\u753b\u9762\u64cd\u4f5c\u3084\u95a2\u6570\u3067\u89e3\u6c7a\u3067\u304d\u308b\u304b\u3092\u78ba\u8a8d\u3057\u3001\u7e70\u308a\u8fd4\u3059\u51e6\u7406\u306bGAS\u3092\u4f7f\u3044\u307e\u3059\u3002 \u76ee\u7684\u304b\u3089\u624b\u9806\u3092\u9078\u3076 \u3084\u308a\u305f&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/spreadsheet-sheet-index-menu-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/cg-method.com\/google\/spreadsheet-sheet-index-menu\/\">Google\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u2502\u5927\u91cf\u30b7\u30fc\u30c8\u3092\u4e00\u767a\u9078\u629e\uff01\u4fbf\u5229\u30e1\u30cb\u30e5\u30fc\u3067\u30b7\u30fc\u30c8\u4e00\u89a7\u3092\u8868\u793a\u3057\u3066\u79fb\u52d5\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">GAS\u3067\u4e0a\u90e8\u306b\u300c\u30b7\u30fc\u30c8\u79fb\u52d5\u300d\u30e1\u30cb\u30e5\u30fc\u3092\u8ffd\u52a0\u3057\u3001\u8868\u793a\u4e2d\u306e\u30b7\u30fc\u30c8\u3092\u540d\u524d\u3067\u9078\u3076\u4f5c\u4f8b\u3067\u3059\u3002 GAS\u306fGoogle\u30b5\u30fc\u30d3\u30b9\u3092\u64cd\u4f5c\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3001\u7de8\u96c6\u6a29\u9650\u306e\u3042\u308b\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306b\u30b3&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/google-sheets-auto-copy-with-date-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/cg-method.com\/google\/google-sheets-auto-copy-with-date\/\">Google\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u2502\u81ea\u52d5\u3067\u65e5\u4ed8\u5165\u308a\uff01\u8907\u88fd\u30b7\u30fc\u30c8\u3092\u4f5c\u6210\u3059\u308b\u65b9\u6cd5<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">master\u30b7\u30fc\u30c8\u304b\u3089\u6708\u3054\u3068\u306e\u30b7\u30fc\u30c8\u3092\u8907\u88fd\u3057\u307e\u3059\u3002 \u5e74\u6708\u306f\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u30bf\u30a4\u30e0\u30be\u30fc\u30f3\u3067\u6c7a\u3081\u3001\u540c\u3058\u5e74\u6708\u540d\u306e\u30b7\u30fc\u30c8\u304c\u3042\u308c\u3070\u4e0a\u66f8\u304d\u305b\u305a\u306b\u7d42\u4e86\u3057\u307e\u3059\u3002 \u7df4\u7fd2\u30b3\u30fc\u30c9\u30fb\u5165\u529bJ&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/google-sheets-gas-get-a1-value-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/cg-method.com\/google\/google-sheets-gas-get-a1-value\/\">Google\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u2502GAS\u3067\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306eA1\u30bb\u30eb\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u672c\u7a3f\u306fWeb\u7248Google\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u7df4\u7fd2\u8868\u3067\u3001\u64cd\u4f5c\u3068\u7d50\u679c\u3092\u78ba\u304b\u3081\u308b\u624b\u9806\u3092\u8aac\u660e\u3057\u307e\u3059\u3002 A1\u306e\u5024\u306f getRange(&#8220;A1&#8221;).getValue() \u3067\u53d6\u5f97\u3057\u307e\u3059\u3002 \u30d5\u30a1\u30a4\u30eb\u3001\u30b7\u30fc\u30c8\u540d\u3001\u30bb&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/cg-method.com\/google\/wp-content\/uploads\/2025\/05\/google-sheets-copy-template-check-checkbox-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/cg-method.com\/google\/google-sheets-copy-template-check-checkbox\/\">Google\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u2502\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u65e5\u4ed8\u5225\u306b\u8907\u88fd\uff06\u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u51e6\u7406\u3082\u81ea\u52d5\u5316\u3059\u308b<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Google Apps Script\uff08GAS\uff09\u3067\u3001\u6b21\u306e\u51e6\u7406\u3092\u307e\u3068\u3081\u3066\u5b9f\u884c\u3057\u307e\u3059\u3002 \u65e5\u4ed8\u3092\u3082\u3068\u306b\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u4ed8\u3051\u3066 \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3092\u30b3\u30d4\u30fc \u30c1\u30a7\u30c3\u30af\u30dc\u30c3\u30af\u30b9\u306e\u72b6\u614b\u3092\u78ba&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6b8b\u3059\u30b7\u30fc\u30c8\u540d\u3092\u6307\u5b9a\u3057\u3001\u305d\u308c\u4ee5\u5916\u306e\u30b7\u30fc\u30c8\u3092GAS\u3067\u524a\u9664\u3059\u308b\u624b\u9806\u3067\u3059\u3002\u524a\u9664\u524d\u306b\u5bfe\u8c61\u4e00\u89a7\u3092\u4e0b\u898b\u3057\u3001\u5b9f\u884c\u6642\u306f\u30d5\u30a1\u30a4\u30eb\u5168\u4f53\u306e\u30b3\u30d4\u30fc\u3092\u4f5c\u3063\u3066\u304b\u3089\u524a\u9664\u3057\u307e\u3059\u3002\u6700\u521d\u306f\u672c\u756a\u30d5\u30a1\u30a4\u30eb\u3092\u8907\u88fd\u3057\u305f\u7df4\u7fd2\u7528\u30d5\u30a1\u30a4\u30eb\u3067\u8a66\u3057\u3066\u304f\u3060\u3055\u3044\u3002 \u6b8b\u3059\u30b7\u30fc\u30c8\u540d\u3068 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":23028,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","book_review_data":"","footnotes":"","ssp_meta_title":"\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u306e\u30b7\u30fc\u30c8\u524a\u9664\u3092GAS\u3067\u307e\u3068\u3081\u3066\u4e00\u62ec\u51e6\u7406","ssp_meta_description":"Google\u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8\u3067\u6b8b\u3057\u305f\u3044\u30b7\u30fc\u30c8\u540d\u3092\u914d\u5217\u3067\u6307\u5b9a\u3057\u3001\u5bfe\u8c61\u5916\u306e\u4e0d\u8981\u30b7\u30fc\u30c8\u3092GAS\uff08Google Apps Script\uff09\u3067\u4e00\u62ec\u524a\u9664\u3059\u308b\u624b\u9806\u3068\u30b3\u30fc\u30c9\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002\u62e1\u5f35\u6a5f\u80fd\u306e\u30a8\u30c7\u30a3\u30bf\u306b\u8cbc\u308a\u4ed8\u3051\u3066\u5b9f\u884c\u3059\u308b\u3060\u3051\u3067\u6574\u7406\u3067\u304d\u307e\u3059\u3002"},"categories":[17],"tags":[18],"class_list":["post-23025","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-spreadsheets","tag-gas"],"_links":{"self":[{"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/posts\/23025","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/comments?post=23025"}],"version-history":[{"count":11,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/posts\/23025\/revisions"}],"predecessor-version":[{"id":23864,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/posts\/23025\/revisions\/23864"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/media\/23028"}],"wp:attachment":[{"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/media?parent=23025"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/categories?post=23025"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cg-method.com\/google\/wp-json\/wp\/v2\/tags?post=23025"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}