Skip to content

Instantly share code, notes, and snippets.

@nmaruy27
Last active November 16, 2022 12:15
Show Gist options
  • Save nmaruy27/ca2c21cfb5285445fecc0bd8d050b314 to your computer and use it in GitHub Desktop.
Save nmaruy27/ca2c21cfb5285445fecc0bd8d050b314 to your computer and use it in GitHub Desktop.
ルートフォルダ直下に作成し、その後に指定フォルダへ移動させる
// ルートフォルダ直下にスプレッドシートを作成
const fileId = SpreadsheetApp.create(spreadsheetName).getId();
// 移動先フォルダの取得
const folder = DriveApp.getFolderById(dataFolder.getId());
// スプレッドシートを移動
DriveApp.getFileById(fileId).moveTo(folder);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment