It's very easy.
1) In your HTML:
# Export to Spreadsheet
2) In your Java:
add(new DownloadLink("link", generateExcelFile());
The DownloadLink is a provided Wicket class. Note that generateExcelFile()
must return a File object. If the file already exists, you just read it. If
you need to create a spreadsheet in POI, I recommend something like this
utility method:
public void File generateExcelFile() {
FileOutputStream fos = new FileOutputStream(new File("report.xls"));
HSSFWorkbook wb = new HSSFWorkbook();
//...
wb.write(fos);
fos.close();
}
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/How-to-Integrate-Wicket-with-Apache-POI-tp3704158p3704508.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]