0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GASでドキュメント共有したい

Last updated at Posted at 2019-03-28

編集権限あり

[ドキュメント変数].addEditor([メアド]);
[ドキュメント変数].addEditors([メアド配列]);

閲覧・コメント権限

[ドキュメント変数].addCommenter([メアド]);
[ドキュメント変数].addCommenters([配列]);

閲覧のみ

[ドキュメント変数].addViewer([メアド]);
[ドキュメント変数].addViewers([メアド配列]);

example.gs
var document = SpreadsheetApp.getActive();
document.addEditor("SonzaisitetaraGomen-nasai@gmail.com");

var addressArray = [];
addrssArray.push("sonzai@gmail.com");
addrssArray.push("sitetara@gmail.com");
addrssArray.push("gomenn@gmail.com");
addrssArray.push("nasai@gmail.com");
document.addViewers(addressArray);

参照
フォルダとファイルを扱う(DriveApp)|GAS入門

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?