<?php
$date=date("d_m_Y_h_i",time());
$file_name="service_report_".$date.".xls";
$data=ob_REQUEST_contents();
ob_end_clean();
header("Content-type: application/x-msdownload");
header("Content-Disposition: attachment; filename=$file_name");
header("Pragma: no-cache");
header("Expires: 0");
print "$data";
?>