ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: jplevene on November 03, 2025, 06:16:05 pm
-
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???
-
The sheets parameter belongs to the importXl method, not importWb.
Please check if this resolves the error.
-
I changed import Wb to importXl, but it made no difference because it doesn't get that far, it breaks before that on
pq.excel.importXl({ file:file }, function(wb) {
Unless I have misunderstood, please could you post the changes you mean.
-
I meant:
pq.excel.importXl({ file:file, sheets: [0] }, function(wb) {
can you please share your spreadsheet as an attachment, you can email it to support if it's too big.
-
I had already done that and it was left in the code above by accident.
Seet attached and I am still on v10.1.0
-
Confirmed an issue with v10.1.0, please upgrade to v11.0.0 as the issue is fixed in the latest version.
-
Please can you post a patch or a few lines of code fix for v10.1 as we haven't upgraded and tested v11 yet.