I had trouble with this for a while but eventually got my head round it. If you pass the parameters you need from your query into a page with the following header tags, the browser believes the page to be an excel attachment and you can open it or save it to excel.
<?php
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Disposition: attachment; filename=radardownload.xls");
//then you can output whatever data you need in your excel...
print("<TABLE BORDER=2 CELLSPACING=2 CELLPADDING=2 WIDTH=100%>");
print("<TR><TD>Test</TD></TR>");
print("<TR><TD>Data</TD></TR>");
print("</TABLE>");
?>
If this page was called Excel.php, then merely create a hyperlink to point to it.
A good tutorial is here
Hope this helps!