Giter Site home page Giter Site logo

Can be used for xls excel files? Facing FormatException: Could not find End of Central Directory Record for xls file. about excel HOT 7 CLOSED

xzghx avatar xzghx commented on September 17, 2024
Can be used for xls excel files? Facing FormatException: Could not find End of Central Directory Record for xls file.

from excel.

Comments (7)

FauconSpartiate avatar FauconSpartiate commented on September 17, 2024

Could you provide an example file where the error shows up?
This will help us to investigate the issue

from excel.

chipnetics avatar chipnetics commented on September 17, 2024

HI, I'm not the OP but have the same issue as them and a couple findings as well.

I got the FormatException: Could not find End of Central Directory Record when trying to run the library on a .xls that was extracted directly from a web application, and downloaded to the desktop.

Unfortunately I can't share the xls as it has proprietary info... so I deleted the stuff in the file, put in some dummy data, and resaved (still) as .xls (97-2003). However then the error changes to Unsupported operation: Excel format unsupported. So whatever modern Excel does with saving, it seems the errors change. Thus this may be difficult to replicate....

The web application in question that is generating the xls is rather "legacy", so it may be that older "true" ways of saving .xls had a nuance to them. If someone had a original version of old school Excel and could make a dummy workbook, that would be the best way to test.

EDIT I saw that xls isn't supported anyhow and is closed as "won't fix", so any of this is mute really. But at least maybe explains some behavior for future searches. However, there probably should be a bug fix that if the extension is .xls it immediately gives 'Excel format unsupported' and bails (thus no Central Directory Record exception).

from excel.

sanburnn avatar sanburnn commented on September 17, 2024

yup i got same error Unsupported operation: Excel format unsupported. when import .xls format @FauconSpartiate

from excel.

FauconSpartiate avatar FauconSpartiate commented on September 17, 2024

.xls files are indeed not supported, as described in many issues that are already closed.

But @chipnetics idea of throwing the correct error to let the user know it's good, I'll try to do that when I can.

Edit: There is already an exception thrown for .xls files. Like @sanburnn mentioned, it is Unsupported operation: Excel format unsupported. I'm opening a PR to clarify it more that the error is due to the .xls format.

from excel.

FauconSpartiate avatar FauconSpartiate commented on September 17, 2024

Here is a file I found that throws the original error (FormatException: Could not find End of Central Directory Record):
file_example_XLS_10.xls

from excel.

FauconSpartiate avatar FauconSpartiate commented on September 17, 2024

Fixed in #258

(Actually not fixed, just clarified that it is not supported)

from excel.

sanburnn avatar sanburnn commented on September 17, 2024

@FauconSpartiate oke thankyou

from excel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.