Gsheets Apps脚本:在Google云端硬盘的特定文件夹中复制电子表格

时间:2018-11-09 21:01:42

标签: google-apps-script

我找不到解决方案:

伪代码

   Create Spreadsheet 'Spreadsheet_B' in folder 'myfolder'

   Paste copy of 'Spreadsheet_A' into 'myfolder'

1 个答案:

答案 0 :(得分:1)

var folder = DriveApp.getFolderById("id of the destination folder");
var copyFile=DriveApp.getFileById("id of the Spreadsheet you want to make the copy ");
folder.makeCopy("name of the new spreadSheet",copyFile);

Where to find the 'id' of a folder and/or a Spreadsheet in Gdrive