I am using PHP to import a CSV file, which originates from an excel spreadsheet. Some of the fields contain line breaks in them, so when I reopen the csv in excel / open office
My solution is the following:
nl2br(string);
http://php.net/manual/en/function.nl2br.php
Once you get to the individual cell (string) level, run it on the string and it will convert the linebreaks to html breaks for you.