Protected sheet prevent certain Google script functions to run properly

22 views
Skip to first unread message

Nguyen Vu

unread,
Oct 14, 2019, 11:28:45 PM10/14/19
to Google Apps Script Community
I have a sheet that's protected in some area like V1:V12. It however prevent certain script functions to run in a completely different range like .getLastRow(), getRange("K5:K100").clear({contentsOnly: true, skipFilteredRows: true}),sheet.deleteRows(15,15). Also getting value in protected range: getRange("V3").getValue also cannot run. They all give error that you need permission to edit range. I ended up removes all protections and the script run normally.

Just to be clear, I create protection from the owner's account. The certain script functions cannot run for editor accounts after some ranges in sheet protected (not entire sheet). There are many other script functions still run correctly. The script run correctly for the owner account (of course). I removed protection by using the owner account, after that, the script run fine for editors.

I really need the sheet to be protected (so the user will not mess up the functionality), is there a way to fix this?
Reply all
Reply to author
Forward
0 new messages