Hi Nicola, you could try something like this:
excel = WIN32OLE::new('excel.Application')
workbook = excel.Workbooks.Open('C:\Documents and
Settings\kennedyn\My Documents\WATIR_RUBY\excel
_testdata2.xls')
worksheet = workbook.Worksheets(1) #get hold of the first
worksheet
worksheet.Select
[EMAIL PROTECTED] = []
[EMAIL PROTECTED] = worksheet.Range('a1:z1').value # The data is in cell
a1.
#puts @mydata # to c wether the content is in the array.
excel['Visible'] = true # hide the spreadsheet from view
line = '1'
while val = worksheet.Range("a#{line}")['Value'] #pull the value
stored in the cell while it's valid
ie.goto(val) #use the value
line.succ! #update the line number
end
This will only loop through for the first column a(1-end of valid values).
You can expand it to pull an array if you want.
-Charley
workbook.close
excel.Quit
On 3/26/07, Nicola Kennedy <[EMAIL PROTECTED]> wrote:
Hi,
I did this and the logs showed the websites as follows:
.......
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general