CSV Reports
Quick Start C#

CSV Reader

 

CsvReader csvReader = new CsvReader(); //Trial Mode

//CsvReader csvReader = new CsvReader("place user name here", "place license key here"); //License Mode

//Create a test file

string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "testReader.csv");

File.WriteAllText(filePath, "Name,Birthdate\r\nJohn,5/30/2013");

List<TestMapper> results = csvReader.CsvFileToObjectList<TestMapper>(filePath);

Console.WriteLine(results[0].Name);

CSV Writer

 

CsvWriter csvWriter = new CsvWriter(); //Trial Mode

//CsvWriter csvWriter = new CsvWriter("place user name here", "place license key here"); //License Mode

List<Person> persons = new List<Person>();

Person person1 = new Person();

person1.FirstName = "John";

person1.LastName = "Smith";

person1.BirthDate = DateTime.Now.AddDays(-1);

persons.Add(person1);

string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "testWriter.csv");

csvWriter.ClassListToCsvFile(persons,filePath);

Console.WriteLine(File.ReadAllText(filePath));