Any Ideas or good web sites that good ole excel reference
19-05-2003 at 07:42 PM
|
~Bean~ Level: VB Guru Registered: 07-04-2003 Posts: 488
Re: Reading data from an Excel File
Is it known how many columns you have? or are you checking for a blank column header to determine the end of worksheet? and I'm not sure if I know what language script you're using...but try this...
; -- Open the Excel Work book
$_=$objexcel.workbooks.open ($cfilename)
WHILE $x <> ""
;Check for End of File
IF $objexcel.cells($nRow, 1).value = ""
GOTO Cleanup
ENDIF
;Check for Column Header Value that we are Looking For...
IF x$ = $myVal Then
$Row = 2
$x = $objexcel.cells($Row, $Col).value
WHILE $x <> ""
;now do something with Row Values ($x)
? $x
$Row = $Row + 1
$x = $objexcel.cells($Row, $Col).value
LOOP
GOTO Cleanup
END IF