Skip to content

Bug in DelimitedField.cs #431

@FlemmingOstergaard

Description

@FlemmingOstergaard

I have experienced, that if there were more fields in a row, than in the import model AND the first extended field is not quoted it returns and error - "Delimiter '{0}' found ......

I have inserted
private ExtractedInfo BasicExtractString(LineInfo line)
{
if (IsLast && !IsArray) {
var sepPos = line.IndexOf(Separator);

            if (sepPos == -1)
                return new ExtractedInfo(line);

            if(IsOptional)
                return new ExtractedInfo(line, sepPos);

and it fixes the problem.
I have no experience in submitting this fix, but maybe someone can help to that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions