【发布时间】:2021-03-30 16:56:28
【问题描述】:
我正在使用 CSV Helper 读取 CSV 文件但第一行被跳过,我看到它可以是配置但我看不到如何强制读取第一行。
有什么想法吗?
try
{
using var csv = new CsvReader(file);
var records = csv.GetRecords<TMap>().ToList();
return _mapper.Map<List<T>>(records.ToList());
}
catch (Exception e)
{
throw new Exception($"Error parsing the Csv File. Error: {e.Message}");
}
【问题讨论】: