Export MySQL table to MS Excel using a PHP Script

http://mistonline.in/wp/export-mysql-to-csv-excel-using-php/

Good working example here :

http://www.programmingfacts.com/export-mysql-data-into-excelcsv-via-php/