Skip to content

Instantly share code, notes, and snippets.

@mtmcfarl
Created May 30, 2012 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtmcfarl/2839433 to your computer and use it in GitHub Desktop.
Save mtmcfarl/2839433 to your computer and use it in GitHub Desktop.
appending to csv
require 'csv'
CSV.open('new_list.csv', 'wb') do |csv_out|
CSV.foreach('data.csv', :headers => true, :return_headers => true) do |rec|
csv_out << rec
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment