19.13. Datatable exporter


If you prefer to export an existing JSF datatable instead of writing a dedicated XHTML document, you can execute the org.jboss.seam.excel.excelExporter.export component, passing in the ID of the datatable as an Seam EL parameter. For example, say you have the following datatable:
 
<h:form id="theForm"> 
  <h:dataTable id="theDataTable" value="#{personList.personList}" 
     var="person"> 
    ... 
  </h:dataTable> 
</h:form>
Copy to Clipboard Toggle word wrap
If you want to view this as a Microsoft Excel spreadsheet, place the following in the form:
 
<h:commandLink value="Export" 
   action="#{excelExporter.export('theForm:theDataTable')}" />
Copy to Clipboard Toggle word wrap
You can also execute the exporter with a button, s:link, or other preferred method.
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat