http://fastercsv.rubyforge.org/
Start by installing it using the gem.
sudo gem install fastercsv
After that, you are all set. Just make sure you require rubygems first.
require 'rubygems'
require 'fastercsv'
i=0
FasterCSV.foreach('blogs.csv') do |row|
i=i+1
puts("#{row[2]}")
end
As you can see from above, the row is an array that contains the values from the CSV file.
No comments:
Post a Comment