Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 19. The Microsoft® Excel® spreadsheet application


Seam can generate Microsoft® Excel® spreadsheets through the JExcelAPI library. The document generated is compatible with Microsoft Excel versions 95, 97, 2000, XP, and 2003. At present, only a limited subset of the library functionality is available. Refer to the JExcelAPI documentation for more information about limitations and capabilities.

19.1. Microsoft Excel support

To include Microsoft Excel support in your application, you must include jboss-seam-excel.jar and jxl.jar in your WEB-INF/lib directory. jboss-seam-excel.jar contains the Microsoft Excel JSF controls used to construct views for document rendering, and the DocumentStore component, which serves the rendered document to the user. You will also need to configure the DocumentStore Servlet in your web.xml file. The Microsoft Excel Seam module requires the seam-ui package, and that Facelets be used as the view technology.
You can see an example of Microsoft Excel support in action in the examples/excel project. This demonstrates the exposed functionality of the support, as well as correct deployment packaging.
You can easily customize the module to support other kinds of Microsoft Excel spreadsheet. Implement the ExcelWorkbook interface and register the following in components.xml:
<excel:excelFactory> 
  <property name="implementations"> 
    <key>myExcelExporter</key> 
    <value>my.excel.exporter.ExcelExport</value> 
  </property> 
</excel:excelFactory>
Copy to Clipboard Toggle word wrap
Register the Microsoft Excel namespace in the components tag like so:
xmlns:excel="http://jboss.com/products/seam/excel"
Copy to Clipboard Toggle word wrap
Then set the UIWorkbook type to myExcelExporter to use your own preferred exporter. The default here is jxl, but you can also use CSV with the csv type.
See Section 18.6, “Configuring iText” for information about how to configure the document servlet for serving documents with an .xls extension.
If you have trouble accessing the generated file under Microsoft® Internet Explorer®, especially with HTTPS, check that your web.xml or browser security constraints (see http://www.nwnetworks.com/iezones.htm/) are not too strict.
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat