Tuesday, October 18, 2016

Remove Carriage Return from a CSV File Using C#


string FileData;
string path = "C:\\CSV Processing\\Import\\myfile.csv";
FileData = File.ReadAllText(@path);                      
File.WriteAllText(@path, FileData.Replace("\r\n", "\n")); // Removes ALL CR

No comments:
Write comments
Recommended Posts × +