Spread.Sheets Documentation
toJSON Method
Serialization option that contains the includeBindingSource argument. See the Remarks for more information.
Saves the object state to a JSON string.
Syntax
var instance = new GC.Spread.Sheets.Worksheet(name);
var value; // Type: Object
value = instance.toJSON(serializationOption);
function toJSON( 
   serializationOption : Object
) : Object;

Parameters

serializationOption
Serialization option that contains the includeBindingSource argument. See the Remarks for more information.

Return Value

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

The serializationOption parameter has the following argument:

Argument Type Description
serializationOption.includeBindingSource Boolean Whether to include the sheet's data source and the table's data source when the object state is saved to a JSON string.

 

See Also

Reference

Worksheet type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.