Hi Oliver, Oliver Brinzing schrieb:
maybe a java snippet will help: [...] final CellContentType type = xCell.getType(); if (type == CellContentType.FORMULA) { final CellContentType cellType = (CellContentType) getPropertyValue(xCell, "FormulaResultType");
This should be type int, not CellContentType (which is an enum for the XCell.getType() function). FormulaResult is a namespace in com.sun.star.sheet containing int constants.
http://api.openoffice.org/docs/common/ref/com/sun/star/sheet/SheetCell.html#FormulaResultType http://api.openoffice.org/docs/common/ref/com/sun/star/sheet/FormulaResult.html
if (cellType.getValue() == FormulaResult.STRING) { final XTextRange xTextRange = getTextRange(xCell); if (xTextRange != null) return xTextRange.getString(); } else return new Double(xCell.getValue()); } }
Regards Daniel --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org For additional commands, e-mail: dev-h...@api.openoffice.org