T
thiago_bagua
Hi all,
I have a csv file exported from excel. On cells where there was a comma
in the text, it wraps the character with double quotes. For example:
Column 1,"column two, and some more stuff",Column 3
In a c# dll, .NET framework 1.1, I'm reading the file using a
streamreader then retrieving each line into a string using
reader.ReadLine().
If I use the normal string.Split(',') it ends up splitting the line
into 4 strings:
Column 1
"column two
and some more stuff"
Column 3
Whereas I need it to be split into this:
Column 1
"column two, and some more stuff"
Column 3
Is there a proven and efficient method of splitting the line but
keeping the wrapper character in mind?
Cheers,
Thiago
I have a csv file exported from excel. On cells where there was a comma
in the text, it wraps the character with double quotes. For example:
Column 1,"column two, and some more stuff",Column 3
In a c# dll, .NET framework 1.1, I'm reading the file using a
streamreader then retrieving each line into a string using
reader.ReadLine().
If I use the normal string.Split(',') it ends up splitting the line
into 4 strings:
Column 1
"column two
and some more stuff"
Column 3
Whereas I need it to be split into this:
Column 1
"column two, and some more stuff"
Column 3
Is there a proven and efficient method of splitting the line but
keeping the wrapper character in mind?
Cheers,
Thiago