[英]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?我已经通过 Google Apps 脚本创建了电子表格,但如何通过 Google Apps 脚本共享它们?
You would share the files you have created using the Drive Service您将共享使用Drive Service创建的文件
The service has a file method called setSharing该服务有一个名为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和
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.