ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: entwine.llc.wi on January 27, 2022, 09:28:44 am
-
Ever since I updated to version 8.1.0 of ParamQuery Pro I have been unable to export Excel files.
I am using the sample code from here: https://paramquery.com/demos/export_local (https://paramquery.com/demos/export_local)
I have attached an image of the error message. It basically says that either the file format or the file extension are incorrect.
-
What was your last version before upgrading to v8.1.0
Could you attach/send the Excel file which is causing this error.
-
I was on 6.1.0.
I have attached one of the spreadsheets in a zip file.
Thanks
-
Have you made any custom changes in the SDK pqgrid js file?
Could you please share a sample script from which you have exported this xlsx file?
-
I have not made any changes to the pqgrid.js file.
I'm not sure whether you need to see the entire page or not. It is an MVC project, written in C# on the backend.
I am using the script from one of your demos for the toolbar button.
items: [
{
type: 'select',
label: 'Format: ',
attr: 'id="export_format"',
options: [{ xlsx: 'Excel', csv: 'Csv', htm: 'Html', json: 'Json' }]
},
{
type: 'button',
label: "Export",
icon: 'ui-icon-arrowthickstop-1-s',
listener: function () {
var format = $("#export_format").val(),
blob = this.exportData({
format: format,
nopqdata: true, //applicable for JSON export.
render: true
});
if (typeof blob === "string") {
blob = new Blob([blob]);
}
saveAs(blob, "pqGrid." + format);
}
},
-
Your script to export xlsx file looks fine.
The internal structure of xlsx file attached in your previous post doesn't match with that of pqgrid exported xlsx file. Kindly verify that you are using the original pqgrid SDK files without any changes. Please download fresh copy of the SDK and recheck.
or Kindly share a jsfiddle reproducing the issue so that I can check it for you.
-
Hello,
I had not changed any of the original SDK files. Regardless, updating the SDK seems to have fixed it. Thank you.