Sir,
 
I am storing values from excel to a array name 'data', I am using below code for it.  
 
 
excel = WIN32OLE::new('excel.Application')
 workbook = excel.Workbooks.Open('E:\sam.xls')
 worksheet = workbook.Worksheets(1)         
 worksheet.Select        
 excel['Visible'] = true
line = '2'
data = "">while worksheet.Range("a#{line}")['Value']
data << worksheet.Range("a#{line}:u#{line}")['Value']
data.each { |x| print x,  "\n\n\n".chomp }
puts("\n")
line.succ!
end
Now, I wants to access 3rd element stored in the above array name 'data'.  I am facing problem in doing this.  Please send me a solution for this.
 
Thanks in Advance
 
Vikash Kumar


Here’s a new way to find what you're looking for - Yahoo! Answers
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to