I can successfully load declared hard coded list of array but if I am going to read the data from DB through jquery then pass to jexcel with same object type result it gives me this error:
.jexcel is not a function
I could even print the same result but still having this problem, here my sample code:
$(document).ready(function () {
$.get("/Db/getModule", { 'table': 0 })
.done(function (res) {
console.log(res.data);
displayOutput(res.data);
});
});
function displayOutput(data) {
$('#my').jexcel({ data: data, colWidths: [100, 100, 100, 100, 100, 100] });
}
And here is the working reference code:
data = [
['jExcel', 'Jquery spreadsheet, javascript spreadsheet, jquery', 181],
['Handsontable', 'Another nice javascript spreadsheet plugin', 9284],
['Datatables', 'DataTables is a table enhancing plug-in for the jQuery library.', 5164],
];
console.log(data);
$('#my').jexcel({ data: data, colWidths: [100, 100, 100] });
sample console output from reference and my result:
Any suggestion/comments TIA