I have managed to get Active user in the session/Google workbook using the Session.getActiveUser().getEmail(). However, is there a way to get multiple active users using the spreadsheet? For eg. 'User A' working on Sheet1 and 'User B' working on Sheet2. I would like to get email addresses of User A and User B.
0
votes
1 Answers
0
votes
You can create a log sheet that is being populated each time a user performs an edit
Sample:
function bindMeOnInstallableOnEditTrigger(e){
var logsheet = SpreadsheetApp.openById("XXX").getSheetByName("YYY");
var user = e.user;
var activeSheetName = e.range.getSheet().getName();
logsheet.appendRow([new Date(), user, "edited sheet", activeSheetName]);
}
Bind this function to an installable trigger as described in the documentation.