toJSON

Serializes the workbook in the format defined in the configuration.

Example - Store spreadsheet to 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 data = spreadsheet.toJSON();
    var json = JSON.stringify(data, null, 2);

    $("#spreadsheet").remove();
    $("#result").text(json);
</script>

Returns

Object the serialized workbook.

In this article
Not finding the help you need?