SpreadJS Viewer
## SpreadJS Viewer
Examples in this folder demonstrate how to use **Document Solutions for Excel** on the server to generate or import/export Excel and **SpreadJS** files and then interact with that data on the client using SpreadJS, our JavaScript spreadsheet.
To learn more about **SpreadJS**, visit the [SpreadJS Home Page](https://developer.mescius.com/spreadjs).
All examples in this folder work as below steps:
- Open an Excel file with **Document Solutions for Excel** existing on server.
- Export the workbook to a JSON string by calling **Workbook.ToJson**, then transfer the JSON string to client side.
- At client side, **SpreadJS** control will **FromJson** to let you view the result of the Excel file on server.
Click the **"Template"** button to download and view the Excel file.
In the demo page, you can edit the content in the SpreadJS control, then click the **"Export"** button to get the changed Excel file. The "Export" button works by following steps:
- SpreadJS uses **ToJson** to get a JSON string which contains the latest changes, and post the string to server.
- Document Solutions for Excel at server uses **FromJson** with the JSON string, and then calls **Workbook.Save** to save everything to an Excel file.
- Finally, you can download the changed Excel file.