protobi / js-xlsx

XLSX / XLSM / XLSB (Excel 2007+ Spreadsheet) / ODS parser and writer
http://oss.sheetjs.com/js-xlsx
Other
817 stars 417 forks source link

Get error with `jszip`! #70

Open thearabbit opened 7 years ago

thearabbit commented 7 years ago

I base one Meteor. 1- It is Ok for native https://github.com/SheetJS/js-xlsx install and use. but It don't get style when I generate excel file form template. 2- And then I would like to try this instead, but show error

Cannot find module 'jszip'
dariovillalta commented 6 years ago

What i did to solve is copy that part of the code on the current js-xlsx (the original proyect not this one)

if(typeof JSZipSync !== 'undefined') jszip = JSZipSync;

`

     if(typeof exports !== 'undefined') {
        if(typeof module !== 'undefined' && module.exports) {
               if(typeof jszip === 'undefined') jszip = require('./jszip.js');
        }
     }`

replace with this code on the lines you get the error