[]
Generates a worksheet from the specified JSON string using the provided deserialization options.
Use DeserializationOptions to control how the JSON data is loaded, such as whether formulas or styles are ignored and whether recalculation is prevented after loading.
void FromJson(string json, DeserializationOptions deserializationOptions = null)
Sub FromJson(json As String, Optional deserializationOptions As DeserializationOptions = Nothing)
| Type | Name | Description |
|---|---|---|
| string | json | The input JSON string that describes the worksheet content. |
| DeserializationOptions | deserializationOptions | The DeserializationOptions object that controls how the JSON is loaded. |
worksheet.Range["A1:B2"].Value = new object[,] {
{"Name", "Value"},
{"Test", 100}
};
string json = worksheet.ToJson();
IWorksheet targetSheet = workbook.Worksheets.Add();
DeserializationOptions options = new DeserializationOptions();
options.IgnoreStyle = true;
targetSheet.FromJson(json, options);
Generates a worksheet from the JSON stream.
void FromJson(Stream stream, DeserializationOptions deserializationOptions = null)
Sub FromJson(stream As Stream, Optional deserializationOptions As DeserializationOptions = Nothing)
| Type | Name | Description |
|---|---|---|
| Stream | stream | the input JSON stream. |
| DeserializationOptions | deserializationOptions | the DeserializationOptions object. |
worksheet.Range["A1"].Value = "Sample";
MemoryStream stream = new MemoryStream();
worksheet.ToJson(stream);
stream.Position = 0;
worksheet.FromJson(stream);