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
Although it is old question the answer might be still relevant to ppl.
There is currently new library (framework independent) http://csv.thephpleague.com/ which supports NL chars in fields as well as some filtering.