New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSV File - Delimiter Between Quotes #666
Labels
Comments
I cannot reproduce this. Could you provide a sample .csv file and code that reproduces this issue? |
Not without getting in trouble at work, it's healthcare data.
Basically I have run into the issue when the data looks like this:
"Brown","John","123 Mockingbird Lane, Apt 3G", "Oakland", "California",...
In the above example, a delimiter is in between the quotes in the 3rd column. On Monday, April 15, 2024 at 04:09:39 PM EDT, Johan Appelgren ***@***.***> wrote:
I cannot reproduce this. Could you provide a sample .csv file and code that reproduces this issue?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
What version are you using? Using the latest prerelease this test passes. [Test]
public void GitIssue666()
{
MemoryStream ms = new(Encoding.UTF8.GetBytes("\"Brown\",\"John\",\"123 Mockingbird Lane, Apt 3G\", \"Oakland\", \"California\""));
using var reader = ExcelReaderFactory.CreateCsvReader(ms);
reader.Read();
var values = new object[reader.FieldCount];
reader.GetValues(values);
Assert.That(values, Is.EqualTo(new object[] { "Brown", "John", "123 Mockingbird Lane, Apt 3G", "Oakland", "California" }));
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample Header Line
"Last Name", "First Name", "Last Name, First Name", "Address Line One"
There needs to be a way to tell CSVReader to ignore delimiters between quotes.
Currently when trying to read this file it sees four delimiters in the line above when it should only see three.
The only way to get the file to be read is to open it in excel and save it as an XLS file which is not an option.
The text was updated successfully, but these errors were encountered: