Sheetjs: Uncaught TypeError: jszip is not a constructor

Created on 3 Nov 2017  路  7Comments  路  Source: SheetJS/sheetjs

Hi,
i am trying to extract xlsx file data in a sap ui5 application and i have included two files : " xlsx.js" and "jszip.js". I am able to see both files at run time in source tab. I referred this link "https://archive.sap.com/discussions/thread/3782341" to embed these files in application and modify jszip.js in an attempt to over come the error.

Is anyone else is facing this issue?

Please advice how to proceed further.

Thanks,

Sanny.

Most helpful comment

Use the dist/xlsx.full.min.js script by itself, not the individual files. It's available in the source tree as well as on CDNs like unpkg

All 7 comments

@sanny16 let me know if you already fixed it? You could fix it adding the missing lib to package.json in your node_modules.

$ cd node_modules && npm i jszip

This issue it's about that: #873

Use the dist/xlsx.full.min.js script by itself, not the individual files. It's available in the source tree as well as on CDNs like unpkg

Hi sanny16,

Are you able to solve the issue? M still unable to Extract Data. Getting the error "jszip is not a constructor"

Thanks
Anmol

+1 Im still getting this error on version 0.8.0 using full.min.js..... also I tried on new versions and I was getting XLSX.read is not a function

Update: While version 0.8 was throwing the jzip is not a constructor error and 0.14 was throwing the XLSX.read is not a function error I found that version 0.10.0 actually worked lol. Hopefully that helps someone.

Ill also add that Im using Angular 1 and RequireJS so that might have something to do with it.

@ividrine can you share a small project setup with angularjs + requirejs? Both individual demos https://github.com/SheetJS/js-xlsx/tree/master/demos/angular and https://github.com/SheetJS/js-xlsx/tree/master/demos/requirejs work against the latest 0.14.0

Update: While version 0.8 was throwing the jzip is not a constructor error and 0.14 was throwing the XLSX.read is not a function error I found that version 0.10.0 actually worked lol. Hopefully that helps someone.

Ill also add that Im using Angular 1 and RequireJS so that might have something to do with it.

Thanks for that, 0.10.0 version worked for me too!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gustavosimil picture gustavosimil  路  3Comments

seanmcilvenna picture seanmcilvenna  路  3Comments

DannyRyman picture DannyRyman  路  3Comments

sangpuion picture sangpuion  路  3Comments

jamesbillinger picture jamesbillinger  路  4Comments