From: Peter Hickman Date: 2010-04-16T20:11:42+09:00 Subject: Re: DB to CSV --001485f5ce12e2bb83048458acc6 Content-Type: text/plain; charset=ISO-8859-1 Does something like this work? require 'csv' time = Time.now rows =[] (1..10).each do |x| rows << ['row', x, 'cheese'] end CSV.open("testfile.csv","w",:col_sep => ";") do |csv| rows.each do |row| csv << row end end It this works then look at your data. Also I note that the line rows << r.join("\n") is probably not what you want. It will turn an array into a string. a = ['row',1,'cheese'] a.join("\n") => "row\n1\ncheese" Are you sure you want to do this? --001485f5ce12e2bb83048458acc6--