Inconsistent number of columns #2271
ASPCKenneth
started this conversation in
General
Replies: 2 comments
-
I managed to work around this in the exception handler and compare there the current parser.count with the header count (both are available in the ReadingExceptionOccurredArgs.Exception.Context but still. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I am using the reader to parse a csv file and do not want the reading to stop if an inconsistent amount of columns was detected.
So I handle the ReadingExceptionOccurred and return false, so far so good.
But the next row, which is valid, again raises this exception.
This looks like a bug to me?
In ReadAsync (and Read) methods you can find following, and imho the columncount should not always be set, just compare the parser.count to the amount of columns of the header/first row - or at least only set it when it did not encounter a difference?
Beta Was this translation helpful? Give feedback.
All reactions