Reputation: 11
I am reading the csv using CSVData = fs.readFile(File.csv, "utf-8").
Using new line character as separator CSVData.split(/\r\n|\n/) to read each line.
But there are some rows having data with newline char.
for e.g. in below table row3-colB has data with \n
How I can read such rows using fs? Now our code has many lines and replacing fs with any other liabrary will be a big task. If anyone can suggest alternate solution.
Upvotes: 0
Views: 680
Reputation: 11
I found the solution that I can replace \n in double quotes. Thanks for the hint @Mitch Lillie
Find & replace line breaks between double quotes
Upvotes: 1