Reputation: 11
I am looking for a way to get a listing of current viewers in a given Google Sheets, and very important, the location in the spreadsheet. It concerns a spreadsheet with multiple sheets, so it needs to include the sheet name as well. At the moment I cannot advance beyond:
var SS = SpreadsheetApp.getActiveSpreadsheet();
var Location = SS.getViewers();
This gives me the listing of viewers, but not the sheet they are in.
Upvotes: 1
Views: 72
Reputation: 2998
Warning: as per the documentation, the function .getViewers()
returns the users who have permission to view or comment the document, not the users who are currently viewing it. At the moment though, there is no function that returns the user list you want.
If you think it's really important, you can file a feature request.
Upvotes: 2