Cannot parse the data from CSV file if there is an enter key pressed between two words in same cell
Polachan Paily
91
Reputation points
I am trying to parse the csv file using the following code
string[] EachColumnData = null;
EachColumnData = line.Replace("\",\"", "|").Replace(",,", "||").Replace("\"", "").Split('|');
But it doesnot work,if there is an enter key pressed in between two words of a column value, it would be splitted as new row . I have attached my sample csv format herewith. How can I fix my code to accept the data as a single record even if there is space or enter inside a column value.