As mentioned, first look should be
Spreadsheet::WriteExcel (assuming you're not going to fake it out w/a csv file/excel mime type). Also look at the node
Index of Spreadsheet FAQs that is a good compilation of spreadsheet-related nodes, modules, and links.