toJSON
Serializes the sheet in the format defined in the sheet configuration.
Example - Serialize the sheet as JSON
<div id="spreadsheet"></div>
<pre id="result"></pre>
<script>
$("#spreadsheet").kendoSpreadsheet({
sheets: [{
name: "Food Order",
mergedCells: [
"A1:G1"
],
rows: [{
height: 70,
cells: [{
value: "My Company", fontSize: 32, textAlign: "center"
}]
}]
}]
});
var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
var sheet = spreadsheet.sheetByIndex(0);
var data = sheet.toJSON();
var json = JSON.stringify(data, null, 2);
$("#spreadsheet").remove();
$("#result").text(json);
</script>