Package pt.utl.ist.fenix.tools.spreadsheet.converters

Examples of pt.utl.ist.fenix.tools.spreadsheet.converters.CellConverter


        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);
View Full Code Here

TOP

Related Classes of pt.utl.ist.fenix.tools.spreadsheet.converters.CellConverter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.