Madu Nar wrote:

> Hello there,
>  I am trying to read multiple columns from an xls file and substiture
> those values into a text_field
> 
> Ex: My xls contains
> User Name      password
> aaa            abc321
> bbb            abc123
> 
> 
> I need to pass each row of records into a text_fields for username and
> password and click on go...
> 
> I need to do this till the end of the file... could somebody tell me as
> to how I parameterize the values for the text fields so that it
> automatically picks up the records for each row...

In your example above, one of the field names is "User Name", with a space.
Yet the field separator for the data records below it appears to uses one
or more spaces as delimiters. On the other hand, it might be tabs, hard to
tell from your post.

Let's assume that tabs are used instead of spaces between the fields. If
that is true, then (untested):

File.read("filename").each do |record|
   record.split("\t").each do |field|
      # your turn
   end
end

-- 
Paul Lutus
http://www.arachnoid.com