title: Passing Values Through Excel sheet in Ruby-watir
body: <pre><code> require 'watir-webdriver'
   require 'win32ole'
   require 'roo'
  
  
   b= Watir::Browser.new(:firefox)
   b.goto('https://accounts.google.com/ServiceLogin?service=mail&amp;passive=true&amp;rm=false&amp;continue=http://mail.google.com/mail/&amp;scc=1&amp;ltmpl=default&amp;ltmplcache=2')
   xl = WIN32OLE.new('excel.application')
   wrkbook= xl.Workbooks.Open("C:\\Excel\\mondial1.xlsx")
  
   wrksheet= wrkbook.Worksheets(1)
   wrksheet.Select
  
   username1= wrksheet.Range("a1").Value
   password1= wrksheet.Range("b1").Value
  
   b.text_field(:id, "Email").set("username1")
   b.text_field(:id, "Passwd").set("password1")
   b.button(:id, "signIn").click
  
   xl.Quit
  </code></pre>
  
  <p>I just want to open a Excel sheet and get values from there and i need to provide that as a input to textfield in gmail.</p>
  
  <p><strong>instead of getting values from Excel sheet</strong> *<em>It sets as "username1" directly</em>* <strong>I need to pass values through Excel</strong>   Please provide your suggestion, thanks in advance </p>