Adding a file to Google Drive through Google Scripts -


in standalone google script, have made created google sheet using api, using it's spreadsheetapp.create() function, , filled spreadsheet data.

i have add file google drive, have no idea how. i'm assuming create() method doesn't add drive automatically. thanks!

when use spreadsheetapp.create() creates new spreadsheet natively (and obviously) in drive. there no need add drive , doesn't make sense. can check small code :

function testcreate(){   var newss = spreadsheetapp.create("new test spreadsheet");   browser.msgbox("file in drive "+driveapp.getfilebyid(newss.getid()).getname()); } 

note : run spreadsheet (any spreadsheet) because uses browser.msgbox() method works in spreadsheets.


Comments

Popular posts from this blog

python - Installing PyDev in eclipse is failed -

PHP OOP-based login system -

c# - Nested Internal Class with Readonly Hashtable throws Null ref exception.. on assignment -