[]
Serializes the current worksheet protection settings to a JSON string.
Use this method to serialize the current IProtectionSettings values so that they can be reused with FromJson(string). The serialized content represents worksheet protection options.
string ToJson()
Function ToJson() As String
| Type | Description |
|---|---|
| string | The JSON string representing the current worksheet protection settings. |
worksheet.Protection = true;
IProtectionSettings protectionSettings = worksheet.ProtectionSettings;
protectionSettings.AllowDeletingColumns = true;
string json = protectionSettings.ToJson();