0

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.

MPelletier
  • 16,256
  • 15
  • 86
  • 137
DLS
  • 5,313
  • 8
  • 37
  • 50

2 Answers2

2

For Open Office Basic, you can use ISNUMBER()

ISNUMBER(123)

returns TRUE.

p.campbell
  • 98,673
  • 67
  • 256
  • 322
1

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.

jam
  • 3,640
  • 5
  • 34
  • 50