I've heard of a lot of people that like Roo.  Another gem is one just 
called 'spreadsheet' which seems to be based on an earlier (not maintained 
in a long while) gem called spreadsheet-excel

http://rubygems.org/gems/spreadsheet 

I'd have a look at both that one and Roo, or the XLS.rb stuff, and see 
which one seems to meet your needs the best. 

On Wednesday, June 20, 2012 2:29:23 PM UTC-7, Al wrote:
>
> Check out: http://roo.rubyforge.org/ 
>
> On Jun 20, 5:20 pm, Super Kevy <[email protected]> wrote: 
> > Well give you the simple example based on xls.rb 
> > 
> > You can download an excel interface file called  xls.rb  from f*rom 
>  xls* 
> > .rubyforge.org/svn/trunk/xls.rb. 
> > The project looks inactive, maybe a member of the group knows another 
> > source for the file or what the status of the project is. 
> > 
> > Once xls.rb is download copy it into your project file.  Then try the 
> > sample code 
> > 
> > Assume our range in the worksheet in the spreadsheet is A1..B3 
> >  | A    |  B        | 
> > 1| user |  password | 
> > 2| 1234 | abc       | 
> > 3| 3433 | def       | 
> > 
> > require 'rubygems' 
> > require 'watir-webdriver' 
> > require "watir-webdriver/extensions/alerts" 
> > require 'win32ole' 
> > require './xls.rb'   # OUR DOWNLOADED EXCEL helper 
> > 
> >  sSpreadSheet='myExcelFile.xls' 
> >  sSheetName='Sheet1' 
> >  sRange='A1..B3'   #or better still use a range name 
> >  myData = {}    # Define empty hash table 
> >   xlFile = XLS.new(Dir.pwd + '/'+sSpreadSheetName) 
> >   myData = xlFile.getRowRecords(sRange,sSheetName) 
> >   xlFile.close 
> >   # Check the contents 
> >   puts ' - Length of Data Set: '+myData.length.to_s 
> >   iExcel=0 
> >   myData.each do 
> >     puts myData[iExcel].fetch('user') 
> >     puts myData[iExcel].fetch('password') 
> >    iExcel=iExcel+1 
> >  end 
> > 
> > If you search the group for xls.rb and/or excel you'll find enough topic 
> > help to guide you 
> > 
> > ** 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > On Monday, June 18, 2012 12:30:30 PM UTC-5, Harrington wrote: 
> > > Hi iam considering automating a task that is from an  web base 
> > > application and a Excel work book .   The web base application will 
> > > open in IE and a  I  want to  move data before the two. Is this 
> > > possible to do using ruby on watir  ?

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

Reply via email to