I cannot find any examples of loading a new spreadsheet from a Web API into a Kendo spreadsheet, I am NOT talking about defining the styles in the JavaScript code when the control is initialized, I am talking about pointing a whole new JSON object to the sheets property.
I have tried swapping sheets using the fromJSON() function on JSON objects defined locally, and the first “swap” works:
function swapSheets() {
var currSpreadSheet = $("#spreadsheet").data("kendoSpreadsheet");
currSpreadSheet.fromJSON({sheets: mySheetsTwo});
currSpreadSheet.refresh();
}
You can view the complete code here:
https://dojo.telerik.com/@[email protected]/uquNoXON/3
…but any additional changes to sheets creates an error:
So this is a known bug… I brought it to their attention. How do you load the whole sheets, not just the dataSource (via a separate kendo dataSource)??? Plenty of examples around of the sheets being statically defined in the initialization of the kendoSpreadsheet control….but no where is there an example of assigning a JSON object to the sheets property. You’d think people would want to do that. Maybe not.
George