Answers for "write CSV ruby"

1

ruby create CSV

CSV.open("file.csv", "a+") do |csv|
  csv << ["cow", "3","2500"]
end
Posted by: Guest on March-13-2020
0

save to csv ruby

CSV.open("filename.csv", "wb") do |row|
  row << ["a", "b", "c"]
end
Posted by: Guest on January-07-2021
0

generate csv ruby

require 'csv'
csv_string = CSV.generate do |csv|
  csv << ["row", "of", "CSV", "data"]
  csv << ["another", "row"]
  # ...
end
Posted by: Guest on February-03-2021

Browse Popular Code Answers by Language