Re: : CSV export

From: Date: Fri, 22 Aug 2003 13:28:28 +0000
Subject: Re: : CSV export
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-160418@lists.php.net to get a copy of this message
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

« previous php.general (#160418) next »