saveJSON
Serializes the workbook in the format that is defined in the
configuration. This method does not return the
JSON, but a Promise
object which will yield the JSON data when it is
available.
This method is functionally similar to toJSON
, but it is also able
to save the embedded images (this is the reason why it must be
asynchronous).
Returns
Promise
- A Promise object which will be resolved with the JSON
data.
Example
<div id="spreadsheet"></div>
<pre id="result"></pre>
<script>
var spreadsheet = $("#spreadsheet").kendoSpreadsheet().getKendoSpreadsheet();
spreadsheet
.saveJSON()
.then(function(data){
var json = JSON.stringify(data, null, 2);
$("#result").text(json);
});
</script>