Hi Juan,
Thanks for using Syncfusion products,
We have checked your requirement, and we suggest you to use “updateRange” method to achieve your requirement. We have created simple sample with your scenario, in this sample we have rendered Spreadsheet without data and update the data dynamically after two seconds. Please refer the below code example,
[Spreadsheet.jsx]
window.dataSource = [
{ "Item Name": "Casual Shoes", Date: "02/14/2014", Time: "11:34:32 AM", Quantity: 10, Price: 20, Amount: 200, Discount: 1, Profit: 10 },
//..
{ "Item Name": "T-Shirts", Date: "10/31/2014", Time: "12:01:44 AM", Quantity: 50, Price: 10, Amount: 500, Discount: 9, Profit: 55 }
];
$(function () {
setTimeout(function () {
var xlObj = $("#ejControl_0").data("ejSpreadsheet"), sheetIndex = xlObj.getActiveSheetIndex();
xlObj.updateRange(sheetIndex, { dataSource: window.dataSource, showHeader: true, startCell: "A1" });
}, 2000)
});
|
Also, we have attached the sample with these code example and the same can be downloaded from the below location.
Please check the attached sample whether this fulfilling your requirement if not, please get back to us with more information so that we can work on this and provide you a better solution quickly.
Regards,
Shanmugaraja K