Apache OpenOffice (AOO) Bugzilla – Issue 101713
com.sun.star.sheet.GeneralFunction.STDEV always returns 0
Last modified: 2009-07-12 18:19:47 UTC
I wanted to write a little Calc-Addin for statistical analysis of small datasets. To determine the standard error of a sample, one needs to calculate the standard deviation first. When writing with Java (SUN JRE 1.6.0_14 / NetBeans 6.5) on a Ubuntu 9.04 Jaunty system, I used "com.sun.star.sheet.GeneralFunction.STDEV" to get the standard deviation. But for a dataset like N={2;4;6} this function returns a value of "6.92126369412475E-310", not the correct value of "2". There is a similar issue regarding this function: Issue 22625. Is this still a bug in OpenOffice 3.x - since OOo 1.1 in 2003!? Alternatively, is there any kind of patch or workaround available? Sincerely Christian
You can see, that issue 22625 is not fixed yet. Why do you open a new issue? You can use something like oRange = oSheet.getCellRangeByPosition(0, 0, 0, 5) dim oFunction as variant oFunction = createUnoService("com.sun.star.sheet.FunctionAccess") dim aArgument(0) as variant aArgument(0)= oRange dim result as double result = oFunction.callFunction( "STDEVP", aArgument() ) Please use a newsgroup or mailing list for further discussing this approach. *** This issue has been marked as a duplicate of 22625 ***
duplicate -> closed