Skip to main content

[archive] read from excel

  • April 27, 2009
  • 1 reply
  • 0 views

[Migrated content. Thread originally posted on 27 April 2009]

Hi,

I am reading data from Excel using:

inquire handle-work-sheet range(w-cella)::value in w-valore.

it's possible to know, before reading cell, if the value of the cell is number or text format? Into msexcel.def I have noticed the @IsNumber or @IsText...

Anyone know how to use this method?
thanks

1 reply

[Migrated content. Thread originally posted on 27 April 2009]

Hi,

I am reading data from Excel using:

inquire handle-work-sheet range(w-cella)::value in w-valore.

it's possible to know, before reading cell, if the value of the cell is number or text format? Into msexcel.def I have noticed the @IsNumber or @IsText...

Anyone know how to use this method?
thanks
Isnumber is a method of the WorkSheet, it takes a variant as argument. Problem here, is that anything you get from Excel into a COBOL data item will be converted to the COBOL data item. Also, using a USAGE VARIANT as target will not help.
So, you cannot use IsNumber but there might be other ways that I don't know of.