SetRange
function SetRange(sRange: string = null): boolean
Description
Sets a range to the current protected range.
Parameters
- sRange
string
null The cell range which will be set for the current protected range.
Returns
boolean
Try It
var oWorksheet = Api.GetActiveSheet();
oWorksheet.AddProtectedRange("protectedRange", "Sheet1!$A$1:$B$1");
var protectedRange = oWorksheet.GetProtectedRange("protectedRange");
protectedRange.SetRange("Sheet1!$A$2:$B$2");