Code:
Break ON


$sMyDocument="C:\temp\demo.xls"

; Create Excel application
$oExcel=CreateObject("Excel.Application")

; Uncomment the next line to make it visible
; $oExcel.Visible = 1

; Load the demo document
$oWorkbook=$oExcel.Workbooks.Open($sMyDocument)

; Get the active worksheet
$oWorksheet=$oWorkbook.ActiveSheet

; Iterate the cells in column A, stopping on the first blank cell

do
$iCounter=$iCounter+1
$sText=$oWorkSheet.Range("A"+$iCounter).Text
If $sText
$iCounter " " $sText ?
EndIf
until $sText = ""

; Clean up
$oExcel.Quit()
$oExcel=0

Exit 0



First try ... somehow had to use .Range as .Cell(s) denied to work


Edited by Jochen (2004-12-08 12:10 PM)
_________________________