gam user *username' create drivefile *specifiedfilename* mimetype gsheet parentname *folder*
$ gam user testuser1 create drivefile drivefilename NewestSheet mimetype gsheet parentname "Top Folder"
Getting all Drive Files/Folders that match query ('me' in owners and mimeType = 'application/vnd.google-apps.folder' and title = 'Top Folder' and trashed = false) for test...@rdschool.org
Got 1 Drive File/Folder for test...@rdschool.org...
User: test...@rdschool.org, File: NewestSheet(1gf9U5K-LeXkxsV8lVOSIOqq1od7pxtSS-zLh4ACcFJw), Created
The ID is in the output.
You can get it later as well by looking up the name.
$ gam user testuser1 show fileinfo name "NewestSheet" id
Getting all Drive Files/Folders that match query ('me' in owners and title = 'NewestSheet') for test...@rdschool.org
Got 1 Drive File/Folder for test...@rdschool.org...
User: test...@rdschool.org, Show 1 Drive File/Folder
File: NewestSheet (1gf9U5K-LeXkxsV8lVOSIOqq1od7pxtSS-zLh4ACcFJw)
id: 1gf9U5K-LeXkxsV8lVOSIOqq1od7pxtSS-zLh4ACcFJw
$ gam user testuser1 print filelist query "name= 'NewestSheet'" id
Getting all Drive Files/Folders that match query ('me' in owners and title= 'NewestSheet') for test...@rdschool.org
Got 1 Drive File/Folder for test...@rdschool.org...
Owner,id
test...@rdschool.org,1gf9U5K-LeXkxsV8lVOSIOqq1od7pxtSS-zLh4ACcFJw
Unfortunately, todrive can only create a new spreadsheet file and name the sheet or update an existing spreadsheet file by replacing its contents with the new data and naming the sheet.
It can not add a new sheet to an existing spreadsheet file.
Ross
--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/f48a1cae-750c-492f-a242-d74ba5d56a63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
...