Re: MySQL to EXCEL?

From: Date: Tue, 17 Aug 2004 19:53:02 +0000
Subject: Re: MySQL to EXCEL?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-35751@lists.php.net to get a copy of this message
> I'm having a dilemma (Now that I have power back after the hurricane hit us > directly in Orlando). Anyway, I need to export a database table to Excel, I > can do it as a .txt file without a problem, but I can't seem to get it to > put each column into a separate cell when I try to export as an .xls form, I > think I have this line formed incorrectly for an XLS file, can anyone see if > I need to use any special characters rather than a comma? > > fwrite($filesession,"$id,$new,$recno,$category,$product,$description,$unit,$ > certificate,$instock,$orderpt,$ordernow,$vendor,$unitcost,$unitsell\015\012" > ); > either output the data as a csv which you are doing (on windoze name the file with a .csv extension) or take a look at http://pear.php.net/package/Spreadsheet_Excel_Writer

« previous php.db (#35751) next »