Open GoogleCodeExporter opened 9 years ago
Ditto. Large negative numbers are being returned as large(r) positive values -
there appears to be a limit at about -2 million. Have tried the code sample a
previous user referenced but it also fails. Have just found out that the
original developer/poster of this library no longer supports it and judging by
his short reply has no interest in helping. So... are you still having the
problem? I am trying some things but if I reveal to my bosses that the code I
found to read their excel files is not working I will have to eat some serious
crow. Am trying to rewrite the function GetInt4d in hopes of finding solution.
Any tips or information is appreciated. THanks, John Marno
Original comment by johnma...@gmail.com
on 25 Aug 2011 at 6:28
[deleted comment]
You may already know that there is a fix for the reading of large negative
values on 64-bit systems.
Be aware that there are TWO "GetInt4d" functions which must be updated with the
new code: GetInt4d(..) and _GetInt4d(..)
Replace the contents of these two functions with this:
// Fix for: 32/64bit architecture code:
$_or_24 = ord($data[$pos+3]);
if ($_or_24>=128) $_ord_24 = -abs((256-$_or_24) << 24);
else $_ord_24 = ($_or_24&127) << 24;
return ord($data[$pos]) | (ord($data[$pos+1]) << 8) | (ord($data[$pos+2]) <<
16) | $_ord_24;
Original comment by sundquis...@gmail.com
on 21 Oct 2011 at 8:51
Original issue reported on code.google.com by
endar...@gmail.com
on 17 Jul 2011 at 8:39