Well you need to go back and reread your php book
your code:
<?php
header("Content-type: application/ms-excel");
?>
print("<table>
<tr>
<td>1</td>
<td>t</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td colspan="2">=SUM(A1;B2)</td>
</tr>
</table>
what it needs to be
<?php
header("Content-type: application/ms-excel");
?>
<html>
<body>
<table>
<tr>
<td>1</td>
<td>t</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td colspan="2"><?php =SUM(A1;B2) ?></td>
</tr>
</table>
</body>
</html>