Closed ebmoll closed 6 years ago
Thanks a lot for this detailed report, this is indeed quite serious, BIFF12 encodes numbers very weirdly so I'll try to take a look ASAP.
It should be fixed in 1.0.2
Wow, that was fast! Thanks a lot for the fix! -------- Original message --------From: William Turner notifications@github.com Date: 11/22/17 08:07 (GMT+01:00) To: wwwiiilll/pyxlsb pyxlsb@noreply.github.com Cc: ebmoll samimoll@googlemail.com, Author author@noreply.github.com Subject: Re: [wwwiiilll/pyxlsb] Some negative floats are read incorrectly (#2) It should be fixed in 1.0.2
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/wwwiiilll/pyxlsb","title":"wwwiiilll/pyxlsb","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/wwwiiilll/pyxlsb"}},"updates":{"snippets":[{"icon":"PERSON","message":"@wwwiiilll in #2: It should be fixed in 1.0.2"}],"action":{"name":"View Issue","url":"https://github.com/wwwiiilll/pyxlsb/issues/2#issuecomment-346261962"}}}
Hi,
first, thanks a lot for the library! I found a (quite serious) bug: If I try to load a file containing the numbers "-20222.7" or "-11459.53", they are incorrectly read as "10717195.54" and "10725958.71" respectively. I made a short demo excel:
bug.zip Content of "bug.xlsb" is:
If I execute the following code:
Output:
I'm using 64-bit python 3 on Windows 10 ("Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32")
I have looked quickly in the source code, but I have no idea what causes it. It seems to bee very well reproducible, however.
Greets, Samuel