When I use ".computeFunction(GeneralFunction.STDEV)" to calculate the standard deviation of a dataset, something goes wrong:
Code: Select all
// Get an interface for calculations with 'xCellRange'
XSheetOperation xCellRangeOperate = (XSheetOperation) UnoRuntime.queryInterface(XSheetOperation.class, xCellRange);
// Calculate the standard deviation of elements in 'xCellRange'
xCellRangeStdev = xCellRangeOperate.computeFunction(GeneralFunction.STDEV);
// Use this for later calculations
return xCellRangeStdev;
The same sourcecode would work just fine with counting the number of elements in 'xCellRange' using the same Method but a different constant (e.g. "GeneralFunction.COUNTNUMS"):
Code: Select all
xCellRangeStdev = xCellRangeOperate.computeFunction(GeneralFunction.COUNTNUMS);Here is my system:
OpenOffice 3.0.1
Ubuntu 9.04 Jaunty
Netbeans 6.5
Java SE 1.6.0_13
Does anyone have a clue, what's going on there?
Are there any alternatives in implementing this function with Java?
Sincerely
Christian