[]
Generates a JSON string from the named style.
Use this method to serialize a named style to JSON so that it can be stored or used later with FromJson(string).
string ToJson()
Function ToJson() As String
| Type | Description |
|---|---|
| string | The JSON string that contains the named style definition. |
IStyle style = workbook.Styles.Add("PriceStyle");
style.IncludeNumber = true;
style.NumberFormat = "$#,##0.00";
worksheet.Range["A1"].Style = style;
string json = style.ToJson();