Look at Spreadsheet::WriteExcel.
In reply to Re: How to add headers to columns in excel by Corion in thread How to add headers to columns in excel by perl_mystery