<!--- Retrieve information about films --->
<CFQUERY DATASOURCE="ows" NAME="GetFilms">
  SELECT MovieTitle, AmountBudgeted
  FROM Films
  ORDER BY MovieTitle
</CFQUERY>

<!--- Set the content-type so Excel is invoked --->
<CFCONTENT TYPE="application/msexcel">

<!--- Suggest default filename for spreadsheet --->
<CFHEADER NAME="Content-Disposition" VALUE="filename=FilmBudgets.xls">

<html>
<head><title>Film Budgets</title></head>
<body>

<!--- Output ordinary HTML table, which will --->
<!--- be displayed by Excel as a spreadsheet --->
<table>
  <tr><th>Film</th><th>Budget</th></tr>
  <CFOUTPUT QUERY="GetFilms">
    <tr>
      <td width="400">
        <font face="verdana">#MovieTitle#</font>
      </td>
      <td align="center">
        <font color="red"><b>#AmountBudgeted#</b></font>
      </td>
    </tr>
  </CFOUTPUT>
</table>

</body>
</html>
