-
-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Corrupted zip : can't find end of central directory #35
Comments
@remotevision any updates? |
@remotevision I'm going to close this for now. If you can reproduce this problem, please comment and reopen the issue. |
i too have the same issue |
@nox0311 can you share a file that triggers the error? |
hey i got a solution to this issue..... |
@nox0311 Excel really doesn't care about the file extension. It looks at the content to determine how to parse. To see this, you can take a CSV file, rename as XLSX, and try to open in excel. Two things:
|
i tried parsing that file using the js-xls module mentioned above and it gives an error as: |
@nox0311 Is it a CSV or TSV or HTML file? (also can you send me a copy?) |
i tried another file which was created by c#.net application and still it was parsed properly. but when opened with notepad it gave random symbols. |
@SheetJSDev the file i m using has some sensitive info of organisation i m working in so wont be able to send u a copy.... |
@nox0311 I understand :) If you open the file in notepad, what are the first five characters?
|
the file which i m using shows data as plaintext in notepad but gives error "Unsupported File" when used with xls module. i created another file "demo.xls" in MS Excel and copied all the data from above file in demo.xls . so the conclusion I come to is that Files which are created by MSExcel are parsed easily. |
@nox0311 re-read #35 (comment)
You should use a CSV or TSV parser for the file. There is an attempt at a unified parser https://github.com/SheetJS/j for all formats, but right now it only supports 5: http://sheetjs.com/status/ Since this doesn't directly relate to the XLSX or related formats, I'm going to close the issue here but open a related issue in the relevant project |
Im having the same issue trying to parse a .xls file. It Promt Error: Corrupted zip : can't find end of central directory I download the file from a website made on .net (aspx) |
I'm getting this with xlsx@0.7.12 in node versions 0.12.4 and 4.2.1: The file I'm getting the error with is here: http://www1.nyc.gov/assets/finance/downloads/pdf/rolling_sales/neighborhood_sales/staten_island_sales_prices.xls The file is binary, and works fine in Excel. |
I'm getting this with xlsx with dates |
Hi I was also facing similar issue, while importing .xlsx file "Error: Corrupted zip : can't find end of central directory" .. I tried following which solved the issue. ''result'' is the file input and truncate the format. Since I used excel-builder.js to generate the file. I modified some part xlsx.js library to element styling. Its working for me well . |
anybody has a proper fix for this ? Any chance we could reopen this ticket ? |
@shankararul I'm having the same problem: Corrupted zip : can't find end of central directory |
Hey @cicerohen, i kind of figured out a workaround in this error - http://stackoverflow.com/a/36261090/786326 (Hope it helps) |
@shankarul this error occurred for me why in my function I tried execute readFile(filePath) before the readStream(filePath) end. |
I have a similar issue but with parsing docx... Passing the same path by one method ie a string creates the error whilst using another drag drop API works weird |
The input type has to match the specified type, as explained in the input type table. |
i have got the same issue ,Corrupted zip : can't find end of central directory |
@FlyerJay if you can reproduce the issue in the live demo then it's a bug in the parsing logic and we would love to see an offending file. You can email it to us or attach to a reply here. If you cannot reproduce the issue in the demo, then there's an issue in your integration code and we would need to see a code snippet to advise further. |
@FlyerJay http://oss.sheetjs.com/js-xlsx/ reads the file: This is the full output: https://hastebin.com/zopiresadu.http My guess is that you are either using an older version or your integration code is not correct. Can you check if the version is 0.9.11? |
thank you!!i know where the problem is |
i am also facing the same issue |
@SheetJSDev Hey, I still have the same issue while reading extremely large excel (over than 20Mb, xlsx), I tried to use node stream to handle each chunk because it cannot figure out the sheet results by using XLSX.readFile directly, but it doens't work for that. Could you give me some advices? |
After 6 years there is no solution to this problem 👯
|
I am having this problem. I cannot read any excel files from buffers anymore. |
@PedramMarandi @hlynurl at this point it's most likely a corruption issue somewhere else. To check:
|
@SheetJSDev thank you for your advice. I have confirmed I am dealing with a buffer. This is not something that happened while writing new code. This is all of a sudden happening in my codebase which worked fine before on the exact same files. I even have an app in production working fine which was deployed from my last commit but if I clear all changes and revert back to that commit this still happens.
|
i solved mine by changing the editor |
For me I had the same error when the input file was protected by a password |
can not work with xlsx, just xls can be use |
@hutao96 please raise a new issue and include some details like the actual read call and how the data is obtained |
EDIT: if you encounter this issue, confirm you are using the latest version and that you are using the correct input type! See https://github.com/sheetjs/sheetjs#input-type
For example, using a
FileReader
withreadAsArrayBuffer
will call the load event where the result is anArrayBuffer
, sotype
should be"array"
If data is received through an XHR or fetch, verify that the source data is not UTF8-encoded. Some platforms like AWS Gateway API do this automatically and require an override as explained in the
function
demo--
I am trying to use this library to parse a base64 encoded .xslx file on the server using node.js. I have also removing the base64 header info and loading the data into a binary buffer, but I get the same error.
Here is my function to parse the file:
However, when I try to parse the data, I get the following error.
any thoughts as to why this might be happening? When I load my file into your demo site, it parses it to json just fine.
The text was updated successfully, but these errors were encountered: