Click
Click Examples

Source Viewer : /general/excel-export.htm

<p>
This example demonstrates how to create and export an Excel spreadsheet using
<a class="external" target="_blank" href="http://poi.apache.org/">Apache POI</a>. 
Follow the link below to export the spreadsheet.
</p>

$export

<p>
Note in the Page Java how the Page path is set to null after the Excel
spreadsheet has been written to the response. This tells the ClickServlet that
the page has completed its rendering, and the page template should not be rendered.
</p>