I know how to protect ranges in google sheets through app script but I want to protect specific range dynamically how can we do that?
I have tried putting protection when the data comes from BigQuery but then after using filters it is not letting the update the current sheet because its protected
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('A1:L28').activate();
var protection = spreadsheet.getRange('A9').protect();
protection.removeEditors(['[email protected]']);
I expect the output to be protected only after data reaches to google sheets and then be able to filter the data and changing the data in sheets with no protected sheet error