Git Product home page Git Product logo

Comments (2)

dilshod avatar dilshod commented on September 28, 2024

it should be fixed
1fd32ec

from xlsx2csv.

callix avatar callix commented on September 28, 2024

I'm having issues with Excel storing unrepresentable numbers in sheet1.xml in the following way:

3.4000000000000004
7.3999999999999995

The above are displayed in Excel as 3.4 and 7.4 regardless of display precision: when set to 20 decimals, the first is displayed as 3.40000000000000000000

Your fix to #28 is the following on line 330:

                    elif format_type == 'float' and ('E' in self.data or 'e' in self.data):
                        self.data = ("%f" %(float(self.data))).rstrip('0').rstrip('.')

My problem seems ot be solved by removing the test for Exponential notation and applying the conversion regardless, in effect changing your code to:

                    elif format_type == 'float' and :
                        self.data = ("%f" %(float(self.data))).rstrip('0').rstrip('.')

I'm not sure this wouldn't break anything, but I would appreciate to see it incorporated, maybe as an optional flag to your code, which by the way, is great!

Thanks

from xlsx2csv.

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.