Sub CheckCellType
Dim oDoc, oSheet, oCell As Object
oDoc = ThisComponent
oSheet = oDoc.Sheets.getByName("Sheet1")
oCell = oSheet.getCellByPosition(0,1)
Select Case oCell.Type
Case com.sun.star.table.CellContentType.EMPTY '0
Print "Cell type = " & oCell.Type & " / EMPTY"
Case com.sun.star.table.CellContentType.VALUE '1
Print "Cell type = " & oCell.Type & " / VALUE"
Case com.sun.star.table.CellContentType.TEXT '2
Print "Cell type = " & oCell.Type & " / TEXT"
Case com.sun.star.table.CellContentType.FORMULA '3
Print "Cell type = " & oCell.Type & " / FORMULA"
End Select
End Sub
Both examples, the result is the same, 1, VALUE. How could it be identified more in NUMBER or DATE ?