"use strict";
//********************************************************
// TEST createSpreadsheet
// Creates a spreadsheet in My Drive and then moves it
// to the targetFolder as definned by folder ID - idFolder
//********************************************************
function TESTcreateSpreadsheet(){
// Id of the destination folder
var idFolder = "1LB49y6bMv93ja08EnoV4oPn59IwuJjDz"
// get the destination folder
var targetFolder = DriveApp.getFolderById("idFolder")
// Create the spreadsheet in the root My Drive
var ssTEST = SpreadsheetApp.create("TEST_Spreadsheet")
// Move the spreadsheet into the destination folder
DriveApp.getFileById(ssTEST.getId()).moveTo(targetFolder);
}