The PEAR repository does have an Excel generation package for PHP.
http://pear.php.net/package/Spreadsheet_Excel_Writer/
It generates native Excel files and has numerous functions for formatting. It's programmed in PHP, it's free, and has good documentation. You'll need to program the exporting part yourself, but once you've gotten the data from the Mysql database, creating the excel sheet and formatting is pretty straightforward.
I've actually used it on a production site that the company I work for uses to generate quarterly reports in Excel.