From: "saudaziz@..." Date: 2005-08-19T01:16:16+09:00 Subject: Re: read excel data in an array, doesn't work Nah, what i am trying to do is simply read row by row in excel file and assign each cell in a row to a variable. This assigned variable with the help of Watir module will then be assigned to a textbox value on a form on a web page. So my main goal now is to split the row up as cells and assign each cell a variable. Following worked for me, simple mistake i had range values defined only upto Column D, now they are upto J (the length that i want it to be). def getExcelStuff excel = WIN32OLE::new('excel.Application') workbook = excel.Workbooks.Open('C:\ruby\watir\watir-v1_4\examples\logging\xxx.xls') worksheet = workbook.Worksheets(1) worksheet.Select excel['Visible'] = true line = '1' data = Array.new while worksheet.Range("a#{line}")['Value'] data << worksheet.Range("a#{line}:j#{line}")['Value'] data.each { |x| print x, "\n\n\n".chomp } line.succ! end end