2

How to prevent users from viewing other sheets using Apps Script
I have 3 sheets

  • Tom
  • Jack
  • Mark

I want Tom should see only Tom Sheet
I want Jack should see only Jack Sheet
I want Mark should see only Mark

I am owner of Sheets, I should see ALL Sheets

3
  • Welcome to Web Applications Stack Exchange. The question is too broad. Please add more details to clarify the context. If you are starting with Google Apps Scripts you might have to do a more specific question. Please bear in mind that this is not a help / service desk. This means that you should do your best to learn what is Google Apps Script and how to use it on your own, then if you get stuck, come here to ask a question about a specific problem about using Google Apps Script as web app. If you are looking to ask about programming, try Stack Overflow. Feb 13 at 11:53
  • 1
    A determined user who has at least view rights to a spreadsheet can discover all contents in that spreadsheet. Apps Script cannot help you avoid that. The usual workaround is to create several spreadsheets and use importrange() to get just the relevant content in each user-specific spreadsheet. Feb 13 at 22:25
  • You can do this using apps script web application, but you would need knowledge of basic html and JavaScript
    – TheMaster
    Feb 14 at 12:29

1 Answer 1

1

A determined user who has at least view rights to a spreadsheet can always discover all contents in that spreadsheet. Apps Script cannot help you avoid that.

The usual workaround is to create several spreadsheets and use the importrange() function to get just the relevant content in each user-specific spreadsheet.

Importrange results are view-only. If the users need to be able to edit the data, use importrange() in the other direction, reading data from daughter spreadsheets to the mother spreadsheet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.