简体   繁体   English

Google Apps 脚本如何共享特定的电子表格?

[英]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

The available permissions are listed here 此处列出了可用的权限

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何共享为特定电子表格制作的 Apps 脚本? - How to share an Apps Script that is made for a specific spreadsheet? 如何与具有 Apps 脚本代码的其他人共享 Google 电子表格? - How to share a Google spreadsheet with others that has Apps Script code? 在特定电子表格中读取独立的 Google Apps 脚本 - Read a standalone Google Apps Script in a specific spreadsheet 如何使用Google Apps脚本将特定的行从3个Google电子表格复制到另一个电子表格 - How to copy specific rows from 3 google spreadsheet to another spreadsheet using google apps script 如何使用Google Apps脚本在电子表格的单元格中剪切文本? - How can I clip text in in cell in spreadsheet with google apps script? 如何保护 Google 电子表格中的 Apps 脚本代码? - How to protect the Apps Script code in a Google spreadsheet? 如何与同事共享 Google Apps 脚本? - How can I share a Google Apps Script with my colleagues? 如何使用带有事件的谷歌应用脚本将单行中的特定列从一个谷歌电子表格复制到另一个谷歌电子表格? - How to copy specific columns from a single row from one google spreadsheet to another google spreadsheet using google apps script with an event? 如何使用谷歌应用程序脚本获取特定列谷歌电子表格中的下一个空行 - How to get the next empty row in a specific column google spreadsheet using google apps script 多个开发人员如何协作以维护基于Google Apps脚本,Google表单和Google电子表格的解决方案? - How multiple developers can collaborate to maintain a solution based on Google Apps Script, Google Forms & Google spreadsheet?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM