[]
Generates a workbook from a JSON string containing the contents of .sjs file format.
public void FromSjsJson(string json)
Public Sub FromSjsJson(json As String)
| Type | Name | Description |
|---|---|---|
| string | json | The JSON string. |
worksheet.Range["A1:B2"].Value = new object[,] {
{ "Name", "Value" },
{ "Test", 100 }
};
string json = workbook.ToSjsJson();
IWorkbook importedWorkbook = new Workbook();
importedWorkbook.FromSjsJson(json);
Generates a workbook from a JSON string containing the contents of .sjs file format.
public void FromSjsJson(string json, SjsOpenOptions openOptions)
Public Sub FromSjsJson(json As String, openOptions As SjsOpenOptions)
| Type | Name | Description |
|---|---|---|
| string | json | The JSON string. |
| SjsOpenOptions | openOptions | The open options for opening SpreadJS .sjs file. |
worksheet.Range["A1:B2"].Value = new object[,] {
{ "Name", "Value" },
{ "Test", 100 }
};
string json = workbook.ToSjsJson();
SjsOpenOptions openOptions = new SjsOpenOptions();
IWorkbook importedWorkbook = new Workbook();
importedWorkbook.FromSjsJson(json, openOptions);
Generates a workbook from a JSON stream containing the contents of .sjs file format.
public void FromSjsJson(Stream stream)
Public Sub FromSjsJson(stream As Stream)
| Type | Name | Description |
|---|---|---|
| Stream | stream | The JSON stream. |
worksheet.Range["A1:B2"].Value = new object[,] {
{ "Name", "Value" },
{ "Test", 100 }
};
string json = workbook.ToSjsJson();
IWorkbook importedWorkbook = new Workbook();
using (MemoryStream stream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(json)))
{
importedWorkbook.FromSjsJson(stream);
}
Generates a workbook from a JSON stream containing the contents of .sjs file format.
public void FromSjsJson(Stream stream, SjsOpenOptions openOptions)
Public Sub FromSjsJson(stream As Stream, openOptions As SjsOpenOptions)
| Type | Name | Description |
|---|---|---|
| Stream | stream | The JSON stream. |
| SjsOpenOptions | openOptions | The open options for opening SpreadJS .sjs file. |
worksheet.Range["A1:B2"].Value = new object[,] {
{ "Name", "Value" },
{ "Test", 100 }
};
string json = workbook.ToSjsJson();
SjsOpenOptions openOptions = new SjsOpenOptions();
IWorkbook importedWorkbook = new Workbook();
using (MemoryStream stream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(json)))
{
importedWorkbook.FromSjsJson(stream, openOptions);
}