PydPiper / pylightxl

A light weight, zero dependency, minimal functionality excel read/writer python library
https://pylightxl.readthedocs.io
MIT License
303 stars 47 forks source link

Issues reading range of cells, each cells have decimals #40

Closed JavierRenero closed 3 years ago

JavierRenero commented 3 years ago

Pylightxl Version: 1.54 Python Version: 3.9.2

Summary of Bug/Feature: Issues reading range of cells, each cells have decimals

Traceback: i do not know how to do it

Suggestion for fix: No clue

My Code:

db = xl.readxl('IrisMod.xlsx') conjEntrenoList = db.ws('Hoja1').range('A1:E135') conjTestList = db.ws('Hoja2').range('A1:E15')

PydPiper commented 3 years ago

Hi Javier, thank you for considering using pylightxl. The current tests run a series of tests against various data types, integers, floats, strings, formulas and they are all showing appropriate results. Can you provide a bit more information on what the issue is that you are seeing? We were unable to replicate the issue from our end.

JavierRenero commented 3 years ago

i can give u the excel if you want to replicate the error. Some funtion names and tag ar in spanish if u need traduction i will help you. IrisMod.xlsx tryFloat.txt

JavierRenero commented 3 years ago

you finally solve it or not clue of the error

PydPiper commented 3 years ago

please do a pip install git+https://github.com/PydPiper/pylightxl.git -U off of github that has the fix. We will include the fix in the next pypi release shortly

JavierRenero commented 3 years ago

it still happens i don't know how to solve it

PydPiper commented 3 years ago

hi @JavierRenero can you try and uninstall pylightxl and install it via pip install git+https://github.com/PydPiper/pylightxl.git the new version will be released shortly on pypi

JavierRenero commented 3 years ago

I already did it. image

JavierRenero commented 3 years ago

and it still happend.

Output: [[0.22222222222222213, 0.6249999999999999, 0.06779661016949151, 0.04166666666666667, -1],... Should be: image

PydPiper commented 3 years ago

i am not seeing the error there. The integer -1 is still an integer -1

JavierRenero commented 3 years ago

what happens is that in some position the number increases by a decimal

PydPiper commented 3 years ago

Here is the raw data out of your spreadsheet. There is no rounding or truncation done by pylightxl. It is directly ready from the full data that excel stores: image

JavierRenero commented 3 years ago

okay it is correct my fault it is correctly done thanks you any ways, is just excel that truncation the numbers on the interface