My code is simple:
$("#fileInput").change(function(e){
var file = e.target.files[0],
filename = file ? file.name.toLowerCase() : "";
if(file && (filename.endsWith("csv") || filename.endsWith("xlsx")))
{
pq.excel.importXl({ file:file }, function(wb) {
if(wb)
{
// Import the workbook
$("#grid")
.pqGrid("importWb", { workbook: wb, sheets:[0] });
}
});
}
});
I get the attached error from the line "pq.excel.importXl({ file:file }, function(wb) {"
Any ideas???