GetAllProtectedRanges
function GetAllProtectedRanges(): ApiProtectedRange[] | "null"
Description
Returns all protected ranges from the current worksheet.
Returns
ApiProtectedRange[] | "null"
Try It
var oWorksheet = Api.GetActiveSheet();
oWorksheet.AddProtectedRange("protectedRange1", "Sheet1!$A$1:$B$1");
oWorksheet.AddProtectedRange("protectedRange2", "Sheet1!$A$2:$B$2");
var protectedRanges = oWorksheet.GetAllProtectedRanges();
protectedRanges[0].SetTitle("protectedRangeNew1");
protectedRanges[1].SetTitle("protectedRangeNew2");