SetTitle

SetTitle(sTitle) → { boolean }

Sets a title to the current protected range.

Parameters:

Name Type Description
sTitle string

The title which will be displayed for the current protected range.

Returns:

Type
boolean

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
oWorksheet.GetRange("A1").SetValue("1");
oWorksheet.GetRange("B1").SetValue("2");
oWorksheet.GetRange("C1").SetValue("3");
oWorksheet.AddProtectedRange("Protected range", "A1:C1");
var oProtectedRange = oWorksheet.GetProtectedRange("Protected range");
oProtectedRange.SetTitle("New protected range");
builder.SaveFile("xlsx", "SetTitle.xlsx");
builder.CloseFile();

Resulting document