I highly recommend Spreadsheet::WriteExcel for your needs. The library is entirely written in Perl, so all you need to do is upload the CPAN library to your web site and specify the specific location. The library documentation and the code snippet below should get you started.
#!/usr/bin/perl -w
use strict;
use lib qw(./lib); # Place for the downloaded WriteExcel library
use Spreadsheet::WriteExcel;
# Send headers
print "Content-type: application/vnd.ms-excel\n";
print "Content-disposition: attachment;filename=rollcharts.org.xls\n\n";
# Create a new workbook and add a worksheet
my $workbook = Spreadsheet::WriteExcel->new("-");
my $worksheet = $workbook->add_worksheet("Colorful Example");
# Create a new format with red colored text
my $format = $workbook->add_format();
$format->set_color('red');
# Add header
$worksheet->write(0, 0, "Fruit.", $format);
$worksheet->write(0, 1, "Cost", $format);
# Add Data
$worksheet->write(1, 0, "Apple");
$worksheet->write(1, 1, "10.25");
# Close Workbook
$workbook->close();