Comments (2)
it should be fixed
1fd32ec
from xlsx2csv.
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)
- Support pathlib.Path as arguments to Xlsx2csv and Xlsx2csv.convert
- ENH: Make xlsx2csv installable through conda-forge HOT 1
- README out of date: lists Python 2.6, 2.7, 3.4 as supported, but nothing newer HOT 2
- Github release out of sync: showing latest as 0.7.8, instead of correct 0.8.1 HOT 1
- `-p`, `--sheetdelimiter` help and code incorrect
- man page outdated HOT 2
- Installation fails on Archlinux: help needed, possible issue with podman ? help2man ?
- Feature Request
- Creates empty .csv file for sheet not found
- Feature request: read xlsx from STDIN HOT 4
- Fails when runs into .DS_Store files
- Unable to handle hidden rows when attribute value of 'hidden' is 'true' in some xlsx files
- potential invalid date format HOT 8
- lost one second when parse datetime HOT 1
- STDIN input broken HOT 1
- Regexp problem
- capture_output is python 3.7 onwards
- Upload whl for 0.8.2? HOT 6
- Listed python alternatives are out of date HOT 2
- Is it possible to add support for xlsx2xls? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xlsx2csv.