Search

19.2. Creating a simple workbook

download PDF
The worksheet support is used like a <h:dataTable>, and can be bound to a List, Set, Map, Array or DataModel.
 
<e:workbook xmlns:e="http://jboss.com/products/seam/excel"> 
  <e:worksheet> 
    <e:cell column="0" row="0" value="Hello world!"/> 
  </e:worksheet> 
</e:workbook>
The following is a more common use case:
 
<e:workbook xmlns:e="http://jboss.com/products/seam/excel"> 
  <e:worksheet value="#{data}" var="item"> 
    <e:column> 
      <e:cell value="#{item.value}"/> 
    </e:column> 
  </e:worksheet> 
</e:workbook>
The top-level workbook element serves as the container, and has no attributes. The child element, worksheet, has two attributes: value="#{data}" is the EL-binding to the data, and var="item" is the name of the current item. The worksheet contains a single column. Within this is the cell, which is the final bind to the data in the currently iterated item.
Now you can bind your data into spreadsheets.
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.

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.

© 2024 Red Hat, Inc.