<!--- 
 Filename: FilmsToPretty.cfm
 Author:  Nate Weiss (NMW)
 Purpose: Outputs film information for Microsoft Excel
--->

<!--- 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>
