I have a csv file with two lines, the first one is the header line, which includes 36 columns separated by ,
The second line is the values, which are 36 value separated by ,
I want to read the second line, I found that all people talk about csvHelper package, so I download it, but it doesn't have any dll
to add to my project.
my question is how to include it and how to read the second line.
I know that I can install it using Install-Package CsvHelper
but I don't want that way because I want to deploy this application on a server. Thus, I would prefer If there is a way like add reference
or something.
if i knew how to include it, reading the second line wouldn't be hard. I would do something like this:
,
.You could use TextReader.ReadLine()
to skip the first line:
using (TextReader reader = File.OpenText("filename"))
{
reader.ReadLine();
// now initialize the CsvReader
var parser = new CsvReader( reader ); // ...
}