Skip to content

Infragistics Community Forum / Web / Ignite UI for jQuery / Error exporting: JSZip is not defined

Error exporting: JSZip is not defined

New Discussion
Flavio
Flavio asked on Feb 9, 2015 3:39 PM

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.

Sign In to post a reply

Replies

  • 0
    Michael Peterson
    Michael Peterson answered on Feb 2, 2015 8:43 PM

    Hello Flavio,

    Thank you for contacting Infragistics!

    I have done some looking into this matter and have the following information. First I would like to note that the client side excel export is still in CTP and therefore not recommended or supported to be used in production environment. So far I have been unable to reproduce the issue you are using. I am attaching my sample please let me know what behavior you see when you run the sample.

    Do you have an isolated sample you can provide to me that reproduces the issue?

    • 0
      Flavio
      Flavio answered on Feb 3, 2015 8:10 AM

      Hi Mike!

      Thank you very much for your sample. I was able to start the Excel exportation (to be honest I didn't find where is the bug on the online sample on my pc, but I see there are a lot of functions on the web sample that are not contemplated in yours).

      Anyway, just one more thing: the system exports an Excel file, but I am not able to open it… It asks me again to save the file when I open it, and it says to me that the format is not correct…

      Thansk in advance

      Flavio M.

      • 0
        Michael Peterson
        Michael Peterson answered on Feb 3, 2015 7:07 PM

        Hello Flavio,

        Thank you for the update. When I try to open the excel file on my machine I am able to do without issue. Do you have excel installed on your machine? Do you get any errors on export?

      • 0
        Flavio
        Flavio answered on Feb 9, 2015 8:39 AM

        Hi,

        of course: I have Excel installed on my laptop. And no, no errors during exports…

        Flavio M.

      • 0
        Michael Peterson
        Michael Peterson answered on Feb 9, 2015 2:34 PM

        Hello Flavio,

        What version of Excel do you have installed on your machine, what happens if you update the workbook type on exporting to be:

        $.ig.excel.Workbook($.ig.excel.WorkbookFormat.excel2007);

      • 0
        Flavio
        Flavio answered on Feb 9, 2015 3:39 PM

        Sorry Mike,

        you were right. I had a problem with Excel installation on my virtual machine. Solved it, I was able to solve the error related to excel file opening in your sample.

        So, your sample works like a charm. I still have that problem copying and paste ig sample on local environment, but for sure there will be something to sort out in a different way, because the way I tried to solve it (first post) shows the meaning of the error.

        Anyway, your sample is enough. I will start implementation basing on it.

        Thank you very much!

        FM

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Flavio
Favorites
0
Replies
6
Created On
Feb 09, 2015
Last Post
11 years ago

Suggested Discussions

Created by

Created on

Feb 9, 2015 3:39 PM

Last activity on

Feb 12, 2026 7:53 PM