I am currently trying to export a sheet as a pdf. This works fine using the getBlob() parameter, but I wish to export with a custom name of the file. When trying to use the following, the MimeType throws up an error message, and if removed the file is exported as plain text which I don't want. Any help would be great, either with exporting the file as a pdf or renaming it later
var sqc = ss.getSheetByName('SQC')
var folder = DriveApp.getFolderById('FOLDER ID')
//var pdf = folder.createFile(ss.getBlob());
var pdf = folder.createFile('New Text File', ss.getBlob, MimeType.exportPDF)
CodePudding user response:
Based on my understanding you are trying to export your Google Sheet to a PDF file.
Here are some of my observations: