Control protected ranges and sheets in Google Sheets with Apps Script
Blog post from Google Cloud
Google Sheets introduced enhanced control over protected sheets and ranges, addressing a popular request among developers for similar capabilities in Google Apps Script. The new Protection class in the Spreadsheet service allows scripts to manage every aspect of range or sheet protection, paralleling the capabilities of the updated Google Sheets UI. This development replaces the older PageProtection class, which will be deprecated but remains available for compatibility with older spreadsheets. Code examples illustrate how to protect specific cell ranges, remove all range protections in a spreadsheet, and create unprotected ranges within protected sheets, providing developers with flexible and granular control over spreadsheet security.
No tracked trend matches for this post yet.