Re: MySQL > Excel

From: Date: Fri, 12 Nov 2004 23:45:18 +0000
Subject: Re: MySQL > Excel
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-201884@lists.php.net to get a copy of this message
Hello, On 11/12/2004 07:44 PM, Sam Smith wrote:
I've got it working writing out a file (fopen) to CSV (comma delimited) and the "header('Content-Disposition: attachment; filename="myFile.csv"')" method but it's clumsy for the user to figure out how to use the file. Is there some totally slick way of spitting out a file that Excel can open right up?
This class does exactly what you want just using fopen("xlsfile:/path/to/spreadsheet.xls","w") and then you use fwrite to send your rows of cells as serialized arrays: http://www.phpclasses.org/xlsstream -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html

« previous php.general (#201884) next »