@svanbelleghem, I’ve never used PHPExcel before, but this has worked for me in the past:
$document = "First, Last\n";
$document .= "Jimmy,Page\n";
header('Content-Type: text/xls');
header('Content-Disposition: attachment; filename="myfile.xls"');
echo $document;