Skip to content

tvilkov/csv-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

CSV Parser

Overview

CSV Parser is small and simple library for parsing CSV-format (Comma Separated Values) files.

Sample

var parser = Csv.Parser(new CsvParserOptions
    {
        HasHeader = true,
        NullValueDetector = (str, type) => string.IsNullOrWhiteSpace(str) || str.Trim() == "-"
    })
    .WithSchemaFromType(typeof(Record));

using (var reader = new StreamReader(File.OpenRead("CorrectData.csv")))
{
    var records = parser.Parse<Record>(reader).ToArray();
    // Process records
}

About

Simple CSV parser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages