You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Visual Studio 2019, .Net Core 2.2 - getting the following error when debugging code to parse a csv file with 10 rows:
{"Line: 2 Column: 593. Delimiter ',' found after the last field 'Taxonomy_Group_15' (the file is wrong or you need to add a field to the record class)"}
I have checked the file and I don't see anything in column 593 (or anywhere else beyond the defined columns for that matter).
Here is the code I'm testing with:
public static void Main(string[] args)
{
var engine = new FileHelperEngine<Entity>();
var result = engine.ReadFile(@"C:\Users\me\Desktop\pfile_20190902-20190908.csv");
foreach (Entity subject in result)
{
Console.WriteLine("Subject Info:");
Console.WriteLine(subject.NPI + " - " + subject.Entity_Type_Code);
}
}
The error is thrown before the foreach loop is entered. I've checked my Entity Class and all columns are present. Can someone help me understand what's going on here?
The text was updated successfully, but these errors were encountered:
If one of your fieldas contains a comma, the parser interpretates it as two fileds and hence, the last column of the row is (probably) considered to be the first column of the next row and there's of course no comma to separate it from the real first column of the row...
Visual Studio 2019, .Net Core 2.2 - getting the following error when debugging code to parse a csv file with 10 rows:
{"Line: 2 Column: 593. Delimiter ',' found after the last field 'Taxonomy_Group_15' (the file is wrong or you need to add a field to the record class)"}
I have checked the file and I don't see anything in column 593 (or anywhere else beyond the defined columns for that matter).
Here is the code I'm testing with:
The error is thrown before the foreach loop is entered. I've checked my Entity Class and all columns are present. Can someone help me understand what's going on here?
The text was updated successfully, but these errors were encountered: