LookForward Chuang
LookForward Chuang

Reputation: 145

How can Google Apps Script to share a specific spreadsheet?

I've created spreadsheets by Google Apps Script, but how can I share them by Google Apps Script?

Upvotes: 1

Views: 745

Answers (1)

Antevasin
Antevasin

Reputation: 183

You would share the files you have created using the Drive Service

The service has a file method called setSharing

You would need to create a reference to the file/s you have created and then use something like

my_file_reference.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.EDIT);

The access permission are listed here

and

The available permissions are listed here

Upvotes: 3

Related Questions