[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IProtectionSettings.FromJson

FromJson Method

FromJson(string)

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.

Declaration
void FromJson(string json)
Sub FromJson(json As String)
Parameters
Type Name Description
string json

The JSON string representing worksheet protection settings.

Examples
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;