I am trying to create a new Google Sheet in a created folder, but am having issues with the content Type.
I have searched for this error but haven't found anything. Most searches come up with a MimeType error, but I don't think that's the issue. Below is the code I'm using:
var ss = SpreadsheetApp.getActiveSpreadsheet();
var newFolder = DriveApp.getFolderById("MyID").createFolder("New Folder");
newFolder.createFile("myFileName",ss,MimeType.GOOGLE_DOCS);
Whenever I run this in my spreadsheet, I get the following error:
Invalid argument: file.contentType (line 3, file "Code")
I have tried using "" for the content for createFile.