There is a need, but I don’t know how to implement it yet. Suppose there is a table to which a number of users have access that can be added. They are combined into several groups that have access to edit different parts of the table. Who has ideas with which tool you can implement the quick sharing of this access, add it to the manual for a long time and is fraught with errors. Here is the code that I want to take as a basis, but manually assigning users and ranges in the script is too capacious, maybe there is a simpler solution.

var spreadsheet = SpreadsheetApp.getActive(); var protection = spreadsheet.getRange('NY1').protect(); protection.setDescription('Диапазон') .removeEditors(['email']); 

thanks for the help

  • "to edit different parts of the table" then you can not read. This is the fanaticism of all newbies. So tables do not work in principle. Question off topic ruSO - oshliaer
  • @oshliaer Let me disagree with you. I will explain, now I have access, or rather protection of various ranges from editing for different users, I want to write a script that will share access, more precisely, I will add approximate code protection for the range in the question. If you write it as clumsily as I have an idea, it will be very large and not flexible, so whoever more experienced can offer a more elegant solution. - Pavel Sergeevich
  • Do as you see fit. But you decided to come to the forum and ask for help. So the best help in this matter is to dissuade trying to do this. I somehow implemented several tasks that blocked real-time the ranges for the user, depending on the order of information input. This is not just group sex. It works only in fantasy and on paper. In reality, there are countless ... And in the other, try. And yes, the message is still off topic community. - oshliaer

0