print "Content-type: application/vnd.ms-excel\n"; # The Content-Disposition will generate a prompt to save the file. If you want # to stream the file to the browser, comment out the following line. print "Content-Disposition: attachment; filename=$name\n";