Build a CSV File generator in Ruby.
This coding exercise examines how to build a method that takes in a collection of data and generates a CSV file that can be viewed in applications such as Microsoft Excel.
headers = %w{Name Title Email} crm_data = [ ["Darth Vader", "CEO", "betterthan@theforce.com"], ["Luke Skywalker", "Dev", "daddy@issues.com"], ["Kylo Ren", "COO", "daddy2@issues.com"], ]
Being able to generate CSV files is a common feature I'm asked to build in a wide variety of applications. Many users need the ability to export data and CSV is one of the most popular methods for reports because they can be opened in Excel.
Can be found on the solutions branch on github.
I've been a software engineer for the past decade and have traveled the world building applications and training individuals on a wide variety of topics.