[]
Loads worksheet protection settings from a JSON string into this object.
Use this method to update the current IProtectionSettings instance from a JSON string produced by ToJson(). The configured settings take effect only when the worksheet is protected.
void FromJson(string json)
Sub FromJson(json As String)
| Type | Name | Description |
|---|---|---|
| string | json | The JSON string representing worksheet protection settings. |
IProtectionSettings source = worksheet.ProtectionSettings;
source.AllowSorting = true;
string json = source.ToJson();
IWorksheet targetWorksheet = workbook.Worksheets.Add();
IProtectionSettings target = targetWorksheet.ProtectionSettings;
target.FromJson(json);
targetWorksheet.Protection = true;