Forum: Ruby on Rails How to change CSV properties.....

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
venkat yejarla (Guest)
on 2006-05-18 08:35
(Received via mailing list)
Hello Good morning to all,


I am doing reports in ruby on rails,i am trying to export data throgh
excel in CSV format.Now i want to set the font to the text exported to
excel sheet.How can i set font..please help me regarding this ...


my sample code was like this...

report = StringIO.new
CSV::Writer.generate(report, ',') do |csv|
	csv << ['Invoice History List']
	csv << [nil,"#{((@start_date).to_s).gsub('-','/')}"]
	csv << [nil]
end

report.rewind
send_data(report.read,
	:type => 'text/csv; charset=iso-8859-1; header=present;',
	:filename => 'invoicehistoryreport.csv', :disposition => 'attachment')




please help me regarding this issue...
This topic is locked and can not be replied to.