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…