Var doc = DriveApp.getFolderById('0B0uw1JCogWHuc29FWFJMWmc3Z1k').createFile(fileBlob) in doPost() these cannot be found out anymoreįormContent.add(app.createHidden("activeCell", SpreadsheetApp.getActiveRange().getA1Notation())) įormContent.add(app.createHidden("activeSheet", SpreadsheetApp.getActiveSheet().getName())) įormContent.add(app.createHidden("activeSpreadsheet", SpreadsheetApp.getActiveSpreadsheet().getId())) įormContent.add(app.createSubmitButton('Submit')) these parameters need to be passed by form Var formContent = app.createVerticalPanel() įormContent.add(app.createFileUpload().setName('thefile')) Var form = app.createFormPanel().setId('frm').setEncoding('multipart/form-data') SpreadsheetApp.getActiveSpreadsheet().show(app) Var app = UiApp.createApplication().setTitle("upload attachment into Google Drive") Var ss = SpreadsheetApp.getActiveSpreadsheet() Update 2016-05 Fixed the script thanks to the comments by Fede and Dov (DocsList.getFolderId was not working any more) // upload document into google spreadsheet Update 2014: Made it working with the new sheets Be sure to replace the id with your folders id in the spreadsheet where you want to upload the file: do Tools→Script Editor.find out the id of the google drive folder you want your attachments be saved (in the example below this is 0B0uw1JCogWHuc29FWFJMWmc3Z1k).upload it to a defined folder on google drive.choose a file from your computer to upload.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |