in reply to creating xls files for download
You are on the right track. You can use content-type and content-disposition to set the mime type and the filename, respectively. My /etc/mime.types seems to think that application/vnd.ms-excel is the correct mimetype for excel.