You can import data from or export data to a JSON object using the fromJSON method and toJSON method.
While exporting data to a JSON object, you can set several serialization options for exporting custom data. These options include ignoreStyle, ignoreFormula, rowHeadersAsFrozenColumns and columnHeadersAsFrozenRows.
While importing data from a JSON object, you can set several deserialization options for custom data import. These options include ignoreStyle, ignoreFormula, frozenColumnsAsRowHeaders, frozenRowsAsColumnHeaders and doNotRecalculateAfterLoad.
This example exports to and imports from a JSON object.
JavaScript |
Copy Code
|
---|---|
workbook.fromJSON(jsonData,{
|
This Visual Studio example loads an ssjson file.
Web.config |
Copy Code
|
---|---|
<?xml version="1.0"?> <!-- For more information on how to configure your ASP.NET application, visit http://go.microsoft.com/fwlink/?LinkId=169433 --> <configuration> <system.web> <compilation debug="true" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" /> </system.web> <system.webServer> <staticContent> <mimeMap fileExtension=".ssjson" mimeType="text/plain" /> </staticContent> </system.webServer> </configuration> |
JavaScript |
Copy Code
|
---|---|
<!DOCTYPE html> <!--jQuery Reference--> <!--SpreadJS Widgets JavaScript--> <body> <div class="container"> </html> |