[]
Generates the named style from the JSON string.
Use this method to load a named style definition from JSON, such as a string previously generated by ToJson().
void FromJson(string json)
Sub FromJson(json As String)
| Type | Name | Description |
|---|---|---|
| string | json | The JSON string that contains the named style definition. |
IStyle sourceStyle = workbook.Styles.Add("PriceStyle");
sourceStyle.IncludeNumber = true;
sourceStyle.NumberFormat = "$#,##0.00";
IStyle copiedStyle = workbook.Styles.Add("CopiedPriceStyle");
copiedStyle.FromJson(sourceStyle.ToJson());
worksheet.Range["A1"].Style = copiedStyle;