You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by David <wz...@gmail.com> on 2012/02/14 01:09:11 UTC

Does POI 3.7 support ttest function?

Hi there,

I encountered an error when trying to evaluate a cell using ttest function:
org.apache.poi.ss.formula.eval.NotImplementedException: 
Error evaluating cell Summary_6103!R3
at org.apache.poi.ss.formula.WorkbookEvaluator.addExceptionInfo
(WorkbookEvaluator.java:321)
at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny
(WorkbookEvaluator.java:288)
at org.apache.poi.ss.formula.WorkbookEvaluator.evaluate
(WorkbookEvaluator.java:221)
at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluateFormulaCellValue
(HSSFFormulaEvaluator.java:320)
at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluate
(HSSFFormulaEvaluator.java:182)
...
Caused by: org.apache.poi.ss.formula.eval.NotImplementedException: TTEST
at org.apache.poi.hssf.record.formula.functions.NotImplementedFunction.evaluate
(NotImplementedFunction.java:42)
at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate
(OperationEvaluatorFactory.java:132)
at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula
(WorkbookEvaluator.java:456)
at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny
(WorkbookEvaluator.java:279)
... 20 more

Is the TTEST function supported? where can I find a list of 
supported functions in POI? 
Is it's not supported, is there a workaround?
Thanks,

David


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


Re: Does POI 3.7 support ttest function?

Posted by Yegor Kozlov <ye...@dinom.ru>.
TTEST is not implemented. At the moment POI supports only basic
statistical functions (COUNT and its variations,  AVERAGE, STDEV, VAR
and POISSON) . Other functions involving complex math  are not yet
supported.

You can't iterate over implemented / not-implemented functions
programmatically. The best way to see what is supported is to study
the source code. All built-in function implementations  live in the
org.apache.poi.ss.formula.functions namespace:

http://svn.apache.org/repos/asf/poi/trunk/src/java/org/apache/poi/ss/formula/functions/

The function API in POI is extendable. To evaluate TTEST  you need to
write a class implementing the Function interface and register this
class  in http://svn.apache.org/repos/asf/poi/trunk/src/java/org/apache/poi/ss/formula/eval/FunctionEval.java

Patches are welcome.

Regards,
Yegor
On Tue, Feb 14, 2012 at 4:09 AM, David <wz...@gmail.com> wrote:
> Hi there,
>
> I encountered an error when trying to evaluate a cell using ttest function:
> org.apache.poi.ss.formula.eval.NotImplementedException:
> Error evaluating cell Summary_6103!R3
> at org.apache.poi.ss.formula.WorkbookEvaluator.addExceptionInfo
> (WorkbookEvaluator.java:321)
> at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny
> (WorkbookEvaluator.java:288)
> at org.apache.poi.ss.formula.WorkbookEvaluator.evaluate
> (WorkbookEvaluator.java:221)
> at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluateFormulaCellValue
> (HSSFFormulaEvaluator.java:320)
> at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluate
> (HSSFFormulaEvaluator.java:182)
> ...
> Caused by: org.apache.poi.ss.formula.eval.NotImplementedException: TTEST
> at org.apache.poi.hssf.record.formula.functions.NotImplementedFunction.evaluate
> (NotImplementedFunction.java:42)
> at org.apache.poi.ss.formula.OperationEvaluatorFactory.evaluate
> (OperationEvaluatorFactory.java:132)
> at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateFormula
> (WorkbookEvaluator.java:456)
> at org.apache.poi.ss.formula.WorkbookEvaluator.evaluateAny
> (WorkbookEvaluator.java:279)
> ... 20 more
>
> Is the TTEST function supported? where can I find a list of
> supported functions in POI?
> Is it's not supported, is there a workaround?
> Thanks,
>
> David
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
> For additional commands, e-mail: user-help@poi.apache.org
>

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


Poi 3.8 Beta 5 - Streaming XSSF Question

Posted by Brian Trezise <br...@intellidata.net>.
I'm trying to build a very low-memory footprint XLSX row iterator.  I 
thought I'd found the solution with the new xssf.streaming package, but 
I'm stumped and looking at the source code and documentation isn't 
helping much as the documentation is all centered around writing, not 
reading, a large xlsx file.  So perhaps somebody can help me out here - 
Basically what's happening is I'm creating an SXSSF workbook from an 
existing workbook.  The existing workbook contains data, but the SXSSF 
version does not seem to have access to it.  See the following code snippet:

[code]
       Workbook wb = WorkbookFactory.create(new FileInputStream(new 
File("/Users/BrianTrezise/Desktop/test1.xlsx")));
       System.out.println("XSSF Sheet Name: " + 
wb.getSheetAt(0).getSheetName());
       System.out.println("XSSF Last Row Number: " + 
wb.getSheetAt(0).getLastRowNum());

       wb = new SXSSFWorkbook((XSSFWorkbook) wb);
       System.out.println();
       System.out.println("SXSSF Sheet Name: " + 
wb.getSheetAt(0).getSheetName());
       System.out.println("SXSSF Sheet Name: " + 
wb.getSheetAt(0).getLastRowNum());
[/code]


[output]:
XSSF Sheet Name: new MFGs
XSSF Last Row Number: 7

SXSSF Sheet Name: new MFGs
SXSSF Sheet Name: 0
[/output]

What am I doing wrong here?

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