我是 Google Scripts for Applications 的新手,我正在尝试获取一组可以编辑 Google 电子表格的用户。当我这样做时DriveApp.getFileById('xxxxxx').getEditors()......它会返回一组用户。当我.getName()对数组中的每个项目运行该方法时,它会返回名称。但是,当.getEmail()对每个项目运行该方法时,它不会返回每个用户的电子邮件地址。
我尝试使用...打开电子表格,SpreadsheetApp.openFileById('xxxxxx').getEditors()并且使用这个数组,我能够.getEmail()在每个项目上运行该方法并获取电子邮件地址。
.getEmail()这些方法有什么区别?为什么我似乎可以从 SpreadsheetApp 收到电子邮件,而不是 DriveApp?