poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 43399] - getCellFormula() returns incorrect formula if row numbers are very large
Date Fri, 14 Sep 2007 22:01:43 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43399>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43399





------- Additional Comments From rmills@dex.com  2007-09-14 15:01 -------
I downloaded the source code and investigated.  The problem is the result of 
taking an int value, writing to 2 bytes and then loading it back into an int.  
This turns numbers greater than 32767 negative.  I was able to resolve this 
problem by placing the following code at the end of the constructors of 
org.apache.poi.hssf.util.CellReference...

        if (row < 0)
            row = (Math.abs(row) - 1) ^ 0xFFFF;

Could someone please add this (or something like it) to the codebase.  Thanks.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message