How to Create a Spreadsheet in a particular folder via App Script

前端 未结 9 1130
说谎
说谎 2020-12-09 10:00

Can anybody help me out,

I want to create a Spreadsheet through App Script in a particular folder. How to do that.

Presently I am doing as follow:

         


        
9条回答
  •  春和景丽
    2020-12-09 10:46

      folder = DriveApp.getFolderById("FOLDER_ID")
      var ss = SpreadsheetApp.create("SPREADSHEET_NAME")
      DriveApp.getFileById(ss.getId()).moveTo(folder);
    

    You may use the above code to achieve the same without using advanced drive services

提交回复
热议问题