GetProtectedRange
function GetProtectedRange(sTitle: string = null): ApiProtectedRange | "null"
Description
Returns a protected range object by its title.
Parameters
- sTitle
string
null The title of the protected range that will be returned.
Returns
ApiProtectedRange | "null"
Try It
var oWorksheet = Api.GetActiveSheet();
oWorksheet.AddProtectedRange("protectedRange", "Sheet1!$A$1:$B$1");
var protectedRange = oWorksheet.GetProtectedRange("protectedRange");
protectedRange.SetTitle("protectedRangeNew");