Is there any way to use apps script to add an exception to a sheet protection?

35 Views Asked by At

I'm making this city thing in google sheets, and I want to be able to add an exception to a sheet protection(see what I mean here). Is there any way to do this programmatically with apps script?

I tried getting the sheet protection and calling .setRange on it, but that didn't work. I also couldn't find anything about this in the apps script documentation.

1

There are 1 best solutions below

0
dataful.tech On BEST ANSWER

You can use setUnprotectedRanges(ranges) (documentation) to set the ranges that can be edited on otherwise protected sheet.