Protect ranges with google apps script -
i have number of sheets need protect except ranges.
is possible script, have several sheets, , many ranges within sheet need unprotected staff can edit sheets.
the ranges need leave unprotected repetitive, i'm hoping it's doable. fill ranges want remain unprotected yellow on example sheet i'll give you.
an example of 1 of sheets can viewed here.
as mentioned, need protect whole sheet, apart these ranges...
n4:v26,n30:v52,n56:v78 etc etc. rest of sheet needs protected. unprotected ranges, columns stay same, each unprotected range separated 3 rows protected.
if can script i'd grateful save me hours of time manually protecting these ranges on many sheets.
regards matt
yes, can accomplish using protection
class. first protect whole sheet using var protection = sheet.protect()
, unprotect ranges want people able edit using protection.setunprotectedranges([ranges])
, [ranges]
array of range objects. can read more in google apps script class protection documentation.
Comments
Post a Comment