Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2048
Error exporting: JSZip is not defined
posted

Hi,

I tried to simple copy and paste your sample about Client-Side Excel Library - Overview on a local environment.

I did different tests:

  • referring your latest cdn files (as in the online sample)
  • referring local files with loader (IG 2014.2 version)
  • referring local files directly (ig 2014.2 version)

I have a problem just before to export data to Excel.

Error exporting: JSZip is not defined

setTimeout(function () {

// Finally, save the workbook and create a link so the .xlsx document can be downloaded
workbook.save(function (err, data) {
   if (err) {
      $status.text("Error exporting: " + getErrorMessage(err));
   } else {
      var blob = new Blob([data], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" });
      saveAs(blob, "grid.xlsx");
      $status.text("Export complete");
   }
});

}, 1);

And, of course, I have that error and null data as callback function from the save one.

Even if I try to set a Workbook format that is not equal to excel2007, for example excel97To2003, I get an error. Of course it is not a missing JSZip, but a Xml_DefaultException with a null exception message...

Any ideas?

Thanks

Flavio M.