usei:
header("Content-type: application/msexcel"
// Como será gravado o arquivo
header("Content-Disposition: attachment; filename=Listagem.xls);
// montando a tabela
echo "<table border='1'>";
echo "<tr>";
echo "<td></td>";
echo "<td>Razao Social</td>";
echo "<td>Email</td>";
echo "</tr>";
$i=1;
while ($rs = mysql_fetch_array($executa)){
echo "<tr>";
echo "<td>".$i."</td>";
echo "<td>" . $rs["Razao_Social"] . "</td>";
echo "<td>" . $rs["email"] . "</td>";
echo "</tr>";
$i++;
}
echo "</table>";