<?php
$file="test.xls";
$test='<table border=1 width="200"><tr><td style="width:400px;">Cell 1</td><td>Cell 2</td></tr><tr><td style="width:400px;">Cell 1</td><td>Cell 2</td></tr></table>';
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=$file");
echo $test;
?>