Spread.Sheets Documentation
fromJSON Method
GC.Spread.Sheets Namespace > Workbook type : fromJSON Method
The spreadsheet data from deserialization.
Loads the object state from the specified JSON string.
Syntax
var instance = new GC.Spread.Sheets.Workbook(host);
var value; // Type: any
value = instance.fromJSON(workbookData);
function fromJSON( 
   workbookData : Object
) : any;

Parameters

workbookData
The spreadsheet data from deserialization.
Example
This example uses the fromJSON method.
activeSheet.getCell(0,0).value(123);
var jsonStr = null;
//export
jsonStr = JSON.stringify(spread.toJSON(false));
//import
spread.fromJSON(JSON.parse(jsonStr));
alert(jsonStr);
Remarks

The deserializationOption parameter has the following arguments:

Name

Type

Description

deserializationOptions

Object

The deserialization options.

Name

Type

Description

ignoreStyle

boolean

optional Whether to ignore the style when converting json to the wrokbook.
ignoreFormula

boolean

optional Whether to ignore the formula when converting json to the workbook.
frozenColumnsAsRowHeaders

boolean

optional Whether to treat the frozen columns as row headers when converting json to the workbook.
frozenRowsAsColumnHeaders

boolean

optional Whether to treat the frozen rows as column headers when converting json to the workbook.
doNotRecalculateAfterLoad

boolean

optional Whether to prevent recalculation after loading the json data.
See Also

Reference

Workbook type