response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-disposition", "attachment; filename=" + getReportFilename(bean));
final ServletOutputStream writer = response.getOutputStream();
new SpreadsheetBuilder().addSheet(getReportFilename(bean), spreadsheet).addConverter(Money.class, new CellConverter() {
@Override
public Object convert(Object source) {
return (source != null) ? ((Money) source).getAmount().doubleValue() : Double.valueOf(0d);
}
}).build(WorkbookExportFormat.EXCEL, writer);