syncfusion/ej2-grids

Error when exporting to Excel

Closed this issue · 2 comments

v15..4.18

When exporting a grid to Excel, the following error is thrown when 'mArchive' is destroyed:
Uncaught (in promise) TypeError: Cannot read property 'mArchive' of undefined
at eval (webpack-internal:///410:845)
at

Workbook.prototype.save = function (fileName, proxyUrl) {
if (fileName === null || fileName === undefined || fileName === '') {
throw new Error('Argument Null Exception: fileName cannot be null or empty');
}
var xlsxMatch = fileName.match('.xlsx$');
var csvMatch = fileName.match('.csv$');
if (xlsxMatch !== null && xlsxMatch[0] === ('.' + this.mSaveType)) {
this.saveWorkbook();
this.saveWorksheets();
this.saveSharedString();
this.saveStyles();
this.saveApp(this.builtInProperties);
this.saveCore(this.builtInProperties);
this.saveContentType();
this.saveTopLevelRelation();
this.saveWorkbookRelation();
this.mArchive.save(fileName).then(function () {
this.mArchive.destroy(); <<<<<<< throws Error <<<<<<<<<<<<<<
});
}
else if (csvMatch !== null && csvMatch[0] === ('.' + this.mSaveType)) {
this.csvHelper.save(fileName);
}
else {
throw Error('Save type and file extension is different.');
}
};

Hi wwalraven,

We have considered “Excel exporting of Grid throws script error” as a defect and logged a report for the same. The fix will be available in our November 23, 2017 release.

Regards,
Pavithra S.

Hi wwalraven,

Thanks for your patience.

We are glad to announce that our Essential Studio Volume 4(v 15.4.19) release is rolled out successfully and In that release, we have added the fix for “Excel exporting of Grid throws script error” issue.

Please let us know if you have any queries.

Regards,
Pavithra S.