in reply to creating xls files for download

While I can't speak to the cgi portion of your question, I have created static html pages with links to .xls files. Spreadsheet::WriteExcel works great for that. However, it's not the fastest thing in the world. Since I'm generating my reports and the static html pages that link to them during slack times, that's not an issue for me. With an interactive interface, it may be for you. If you're generating large, multi-tab spreadsheets you might want to consider a less interactive approach like emailing the completed report to the user rather than have them sit there staring at a 'Working...' message for however long it takes to generate the spreadsheets.

Jack