Question

Is there a function that tests for a string (non numeric) values and returns a boolean value in Open Office Basic?

I tried IsNumeric on a string and it returns a boolean False. But when I negate it with Not(IsNumeric(value)), it converts the return value to a long or an int.

Was it helpful?

Solution

For Open Office Basic, you can use ISNUMBER()

ISNUMBER(123)

returns TRUE.

OTHER TIPS

I've spent hours trying to work out what was up with the ISNUMERIC ...

if IsNumeric(oSheet.GetCellByPosition( 8,iRow).String) then
    oSheet.GetCellByPosition(20,iRow).Value = oSheet.GetCellByPosition( 8,iRow).Value()
else
    oSheet.GetCellByPosition(20,iRow).String = oSheet.GetCellByPosition( 8,iRow).String()
endif

The problem was the fact that attribute feeding into the IsNumeric function must be a string ( not an object or a numeric! )

I will be contacting Andrew Pitonak to ask him to makes this clearer in his manuals.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top