From: "Jesús Gabriel y Galán" Date: 2007-10-16T23:34:46+09:00 Subject: Re: CSV question On 10/16/07, Shai Rosenfeld wrote: > CSV (more specifically FasterCSV) reads the file i provided row by row > > FasterCSV.foreach('path/to/file.csv', 'r') do |r| > r # this is an array of a row in the file > end > > but i need to get the array column by column.. > is there a way i can simply do this? (even rotating the excel 90 degrees > should do the trick as well!) I don't know if there's a better way, but you can do this: a = FasterCSV.parse(File.read("catalogue.csv")) a.transpose.each {|column| ...} but you will have errors if the rows don't have the same number of elements. Hope this helps, Jesus.