Skip to content

jszip is not a constructor #182

@huy1912

Description

@huy1912

Got below error when try to create the excel for download

jszip is not a constructor TypeError: jszip is not a constructor at write_zip....

Dependencies

dependencies from package.json

"dependencies": {
   "xlsx": "^0.18.5",
   "jszip": "^3.10.1",
   "react-data-export": "^0.6.0",
}

npm ls jszip
├─┬ [email protected]
│ └── [email protected]
├── [email protected]
└─┬ [email protected]
└─┬ [email protected]
└── [email protected]

npm ls xlsx
└── [email protected]

<ExcelFile filename="MicrobialCount" element={<SiMicrosoftexcel title="Export Data" style={{cursor:'pointer', height:'20px', width:'20px', color:'Highlight'}}></SiMicrosoftexcel>}>
<ExcelSheet data={data} name="sample">
    <ExcelColumn label="Date" value="date"/>
    <ExcelColumn label="Count" value="count"/>
</ExcelSheet>
</ExcelFile>

Look like the xlsx refer to old jszip version

Please advise how to fix the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions