1

I can edit the list of editors of a protected range just fine. When I create a new protected range, however, it has by default domainUsersCanEdit property set to True. How can I set it to false?

Also, related question: using Google UI you can protect the whole worksheet without setting an arbitrary range in it. Is this possible to do with pygsheets?

I failed to find answers for the above in the official API docs.

1 Answers1

1

The domainUsersCanEdit is set by default by the api. You can make it false by

range.editors = ('domainUsersCanEdit', False)

Also, related question: using Google UI you can protect the whole worksheet without setting an arbitrary range in it. Is this possible to do with pygsheets?

Not at the moment, please raise an issue for the same.

NB: Please update your pygsheets from the github staging branch

Nithin
  • 5,470
  • 37
  • 44
  • Tried that but it didn't work. Upgrading to staging fixed it. I also filled a ticket for the other issue. https://github.com/nithinmurali/pygsheets/issues/378 Also, thanks a lot for this library, it's a life saver! – Karol Jędrzejczyk Sep 27 '19 at 10:16