using (FileStream fs = new FileStream(ofd.FileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
using (TextReader tr = new StreamReader(fs, ExEncoding.UTF8))
using (CsvReader csv = new CsvReader(tr))
{
csv.Configuration.HasHeaderRecord = false;
csv.Configuration.Delimiter = ";";
// accept comment in csv files
csv.Configuration.AllowComments = true;
csv.Configuration.Comment = '#';
values = csv.GetRecords<StringKeyValuePair>().ToList();
}
However, I found out that there doesn't seem to be a standard for csv commenting style.
So you might need to consider documenting or tell the user allowed commenting style if you were to add such feature,
Hi, this is a simple feature request to let imported csv files have comment mechanism such as ignoring lines start with #.
It can be done by modifying Cirilla/ViewModels/ImportCsvWindowViewModel.cs https://github.com/Fusion86/Cirilla/blob/4817c0abad5923449208824dae0b151ae2794b9a/src/Cirilla/ViewModels/ImportCsvWindowViewModel.cs#L70-L78 to
However, I found out that there doesn't seem to be a standard for csv commenting style. So you might need to consider documenting or tell the user allowed commenting style if you were to add such feature,
Have a nice day and keep up the good work.