You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by av...@itellix.com on 2004/01/08 12:08:51 UTC

Re: Large numbers in formula

Yeah, now i remember, I wrote that comment :) .. so it still needs to be done. 

Quoting William Zhu <zh...@yahoo.com>:

> Hi there,
>  
> For this problem, I have checked the POI source code.
> There is a comment at class "FormulaParser.java" and method "Factor()":
>  
> "//TODO:what if the number is too big to be a short? ..add factory to return
> Int or Number!"
>  
> It seems that this is a TO BE DONE problem.
> Maybe "SUM(500*1000 + 1)" is a temporay solution.
>  
>  
> Regards,
> William Zhu
> 
> Sasha Borodin <sa...@whoissasha.com> wrote:
> I was using 2.0-RC1-20031102 but have since upgraded to 2.0 final, and the
> problem persists.
> 
> I'll try to make a bug report in bugzilla - is that system open to the
> general public?
> 
> Thanks,
> 
> -Sasha Borodin
> 
> On 1/29/04 10:16 AM, "Avik Sengupta" wrote:
> 
> > Which version are you using? Its not something that I was aware of, so I
> > doubt its fixed... maybe you can enter a bug in bugzilla.
> > 
> > On Thu, 2004-01-29 at 08:03, Sasha Borodin wrote:
> >> Hello,
> >> 
> >> Thanks to the POI team for such a massive undertaking and great results.
> >> 
> >> I'm having an issue trying to setCellFormula(myFormulaString).
> >> 
> >> myFormulaString = "SUM(500000 + 1)"
> >> 
> >> Calling setCellFormula throws java.lang.NumberFormatException: Value out
> of
> >> range. Value:"500000" Radix:10
> >> 
> >> However, if myFormulaString = "SUM(500*1000 + 1)"
> >> 
> >> ...which is the same number but different representation, no exception is
> >> thrown and everything is fine.
> >> 
> >> This is a doctored example to demonstrate that large numeral
> representations
> >> passed to the setCellFormula function seem to cause the issue. Can anyone
> >> comment on this problem? Is this something that's resolved in POI 2.0?
> >> 
> >> Thank you,
> >> 
> >> -Sasha Borodin
> >> 
> >> 
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> >> 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free web site building tool. Try it!





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