Kai Poppe wrote:
I'm trying to export database entries to a CSV file for Excel.
Everything's working perfectly except that "blob" (long-text) fields that
contain line-breaks are being exported to different lines within the CSV.
With "excel" CSV:
- \n is a record separator
- ; is the field separator (CSV = _Comma_ Separated Values ?!)
- " is used to enclose special chars in fields like ' ' and \n"
- "" is used in fields containing " to replace it
In a word, you just include the \n within surrounding quotes.
See
http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm
Hope it helps, but the CSV format isn't really a standard
(ex MySQL use escapes seq like \" for included " in fields)
--
Christophe Chisogne
Developper, Publicityweb sprl
http://www.publicityweb.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php