From: Venkat r m Reddi Date: 2009-12-30T18:32:20+09:00 Subject: iterate excel columns/rows Hi, If anybody helps me greatly appreciated.. I need to run loops to the column data...below is my testdata which is in a single lengthy row.... http://URL1.com http://URL2.com http://URL3.com pageTitle:Login user1 pwd1 user2 pwd2 user3 pwd3 DB1 DB2 DB3 I know my script is wrong, which was written as below...i want to use xls class... begin xlFile = XLS.new("Dir.getwd + '/TestData.xls") myData = xlFile.getColumnRecords("A1:AZ1", "Sheet1") ensure xlFile.close end myData.each do |r| puts r["user"] puts r["pwd"] # end end ...i want to iterate URL1, URL2, URL3 then user1:pwd1, user2:pwd2, user3:pwd3...and again to iterate db1, db2, db3 like that... your help is greatly appreciated.... thanks, venkat -- Posted via http://www.ruby-forum.com/.