Cannot find file [Content_Types].xml in zip
See original GitHub issueGreetings. I’ve been using your library to read xls files with no issues. However when I try to read any xlsx file, I get the following error:
Uncaught (in promise) Error: Cannot find file [Content_Types].xml in zip at getzipfile (xlsx.js:2822) at getzipstr (xlsx.js:2833) at parse_zip (xlsx.js:20373) at read_zip (xlsx.js:20707) at Object.readSync [as read] (xlsx.js:20773)
I’ve tried to use different files, even changed the extension to .zip to confirm the existence of the [Content_Types].xml. Any ideas on how to fix this issue? Here is how I’m doing to the reading:
return new Promise((resolve, reject) => {
fileReader.onerror = () => {
fileReader.abort();
reject(new Error("Error"));
};
fileReader.onload = () => {
resolve(fileReader.result);
};
fileReader.readAsBinaryString(file);
})
.then(r => { return read(r, {type: 'binary'}); })
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Error: Cannot find file [Content_Types].xml in zip
It seems xlsx@0.16.0 is NOT working with Angular 9 . Any help will be much appreciated. Please checkout the snip here - https://stackblitz.com/ ......
Read more >"Cannot find file [Content_Types].xml in zip" over AWS
"Cannot find file [Content_Types].xml in zip" over AWS. ... I'm running a method that will read a excel file buffer and convert it...
Read more >The Structure of the [Content_types].xml File - Microsoft Learn
Learn about the structure of the content types file, which contains information about the kinds of content in a VSIX package.
Read more >SAS Zip Engine Problem - CRC32 Checksum Error
Adding custom.xml works just fine, but updating either [Content_Types].xml or _rels/.rels causes other xml files to become corrupted, typically in the xl folder ......
Read more >纯前端使用SheetJS读取excel 报错Cannot find file ... - CSDN博客
纯前端使用SheetJS读取excel 报错Cannot find file [Content_Types].xml in zip · 问题场景 · 方案一: · 方案二:.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It looks like you might be using the
xlsx.min.js
file directly. If you are using a script tag, can you referencexlsx.full.min.js
from the dist directory?resolved by integrating xlsx.full.min.js instead of xlsx.min.js