You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Sharath2k <sh...@yahoo.co.in> on 2008/10/14 21:53:31 UTC

HSSFFormulaEvaluator --evaluateFormulaCell StackOverFlow error

 

Im using poi-3.1-FINAL-20080629.jar version.I have a requirement of writing
5000+ records of data to a existing excel sheet which has many number of
formulas.The file size which im writing to is 15Mb,it has 10 sheets.
Im able to write the data successfully.But when i try to evaluate the cells
using the below code Im getting 

Code:
HSSFFormulaEvaluator evaluator = new HSSFFormulaEvaluator(sheet, wb);
for(Iterator rit = sheet.rowIterator(); rit.hasNext();) {
	HSSFRow r = (HSSFRow)rit.next();
	evaluator.setCurrentRow(r);

	for(Iterator cit = r.cellIterator(); cit.hasNext();) {
		HSSFCell c = (HSSFCell)cit.next();
		if(c.getCellType() == HSSFCell.CELL_TYPE_FORMULA) {
			evaluator.evaluateFormulaCell(c);
		}
	}
}

Error:
java.lang.StackOverflowError
	at java.lang.Character.codePointAt(Character.java:2335)
	at java.util.regex.Pattern$BitClass.match(Pattern.java:2873)
	at java.util.regex.Pattern$Sub.match(Pattern.java:5252)
	




I have tested the same peice of code with poi-3.5-beta3-20080926.jar the
code works fine


I cant move poi beta version to be moved to production environment.
Pls help me out


Cheers,
Sc
 
-- 
View this message in context: http://www.nabble.com/HSSFFormulaEvaluator---evaluateFormulaCell-StackOverFlow-error-tp19980950p19980950.html
Sent from the POI - User mailing list archive at Nabble.com.


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


Re: HSSFFormulaEvaluator --evaluateFormulaCell StackOverFlow error

Posted by Nick Burch <ni...@torchbox.com>.
On Wed, 15 Oct 2008, Sharath2k wrote:
>> I have tested the same peice of code with poi-3.5-beta3-20080926.jar 
>> the code works fine

Looks like your bug is fixed then, which is good

>> I cant move poi beta version to be moved to production environment. Pls 
>> help me out

If you want to pay me, I'll happily supply you with a copy of "Nick Burch 
POI 3.1.1 FINAL", which'll be a nightly release of apache poi I personally 
certify as stable and has your fix in it.

Otherwise, you either need to use a beta release, or wait for the next 
final release

Nick

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


Re: HSSFFormulaEvaluator --evaluateFormulaCell StackOverFlow error

Posted by Sharath2k <sh...@yahoo.co.in>.
Hi All,

Can anyone please help me out..

Cheers,
Sc




Sharath2k wrote:
> 
>  
> 
> Im using poi-3.1-FINAL-20080629.jar version.I have a requirement of
> writing 5000+ records of data to a existing excel sheet which has many
> number of formulas.The file size which im writing to is 15Mb,it has 10
> sheets.
> Im able to write the data successfully.But when i try to evaluate the
> cells using the below code Im getting 
> 
> Code:
> HSSFFormulaEvaluator evaluator = new HSSFFormulaEvaluator(sheet, wb);
> for(Iterator rit = sheet.rowIterator(); rit.hasNext();) {
> 	HSSFRow r = (HSSFRow)rit.next();
> 	evaluator.setCurrentRow(r);
> 
> 	for(Iterator cit = r.cellIterator(); cit.hasNext();) {
> 		HSSFCell c = (HSSFCell)cit.next();
> 		if(c.getCellType() == HSSFCell.CELL_TYPE_FORMULA) {
> 			evaluator.evaluateFormulaCell(c);
> 		}
> 	}
> }
> 
> Error:
> java.lang.StackOverflowError
> 	at java.lang.Character.codePointAt(Character.java:2335)
> 	at java.util.regex.Pattern$BitClass.match(Pattern.java:2873)
> 	at java.util.regex.Pattern$Sub.match(Pattern.java:5252)
> 	
> 
> 
> 
> 
> I have tested the same peice of code with poi-3.5-beta3-20080926.jar the
> code works fine
> 
> 
> I cant move poi beta version to be moved to production environment.
> Pls help me out
> 
> 
> Cheers,
> Sc
>  
> 

-- 
View this message in context: http://www.nabble.com/HSSFFormulaEvaluator---evaluateFormulaCell-StackOverFlow-error-tp19980950p19992845.html
Sent from the POI - User mailing list archive at Nabble.com.


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