jeudi 5 mai 2016

Ruby - Add multiple sheet with customized name in CSV

I want to create a CSV file with multiple sheet(sheet1,sheet2 ..) also I should name the sheet in CSV file.

require 'csv'
csv_string  = CSV.generate do |csv|
      csv << ["Name", "age", "address"]
      csv << ["foo", "bar", "foo-bar"]
end

I am able to create only one sheet, How do I create multiple sheet.?

Kindly help

Aucun commentaire:

Enregistrer un commentaire