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.


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:


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:cell>Hello, World !</xls:cell>

Tag library


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"%>