fromJSON

Loads the workbook data from an object with the format that is defined in the configuration.

All existing sheets and their data will be lost.

Parameters

data Object

The object from where data will be loaded. This has to be the deserialized object, not the JSON string.

Example - loading the spreadsheet from JSON

<div id="spreadsheet"></div>
<script>
    $("#spreadsheet").kendoSpreadsheet();

    var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");
    spreadsheet.fromJSON({
        sheets: [{
            name: "Food Order",
            mergedCells: [
                "A1:G1"
            ],
            rows: [{
                height: 70,
                cells: [{
                    value: "My Company", fontSize: 32, textAlign: "center"
                }]
            }]
        }]
    });
</script>
In this article