This sample script retrieves the user information which is editing the shared spreadsheet.
It was found as follows.
- User information retrieving by Class Session is the owner and users which installed triggers by themselves.
- When each user installs a trigger, user information retrieving by Class Session losts the accuracy. So user information has to be retrieved using a temporally installed trigger.
- Using
onOpen()
, it cannot directly install triggers and authorize. - Using menu bar, it can install triggers and authorize Google Services using API.