Excel Tag Library

How does it works ?

Excel Tag Library is based on Apache POI 3.7. It uses very simple JSP-Tags to produce an Excel compatible output, ready to be downloaded from yor WEB application.

Installation

You can integrate the source or you can simply download the jar, drop it in your WEB-IN/lib directory and add the reference in web.xml:
<taglib>
	<taglib-uri>http://digamma.ch/taglib/excel.tld</taglib-uri>
	<taglib-location</WEB-INF/excel.tld</taglib-location>
</taglib>

Usage

Add the reference to the taglibrary on the top of your JSP
<%@ taglib uri="http://digamma.ch/taglib/excel.tld" prefix="xls"%>
An example of a minimal excel file:
<xls:workbook filename="simpleExcel.xls">
	<xls:sheet name="First Sheet">
		<xls:row>
			<xls:cell>Hello, World !</xls:cell>
		</xls:row>
	</xls:sheet>
</xls:workbook>

Tag library

Troubleshooting

In the page section of the jsp, you must declare trimDirectiveWhitespaces="true". This is needed to avoid the JSPWriter to fill up the buffer, and thus conflict later when the Excel Workbook has to be written in the SerlvetOutputStream.
<%@page autoFlush="false" buffer="8kb" trimDirectiveWhitespaces="true"%>