IAM-XLS is a PHP class for generating an XLS file.
Alternatively, it can be used for performing a
query dump and sending it to the browser as an
Excel file. It allows the user to enter text and
numeric values into a Excel spreadsheet. It has
browser and OS detection capabilities for
appropriate handling of downloads (content-type,
etc.).