Examples of CellConverter


Examples of cuke4duke.CellConverter

        return hash;
    }

    @Given("a table that we convert:")
    public void convertTable(Table t) {
        t.mapColumn("b", new CellConverter() {
            public String convertCell(String cellValue) {
                return "converted_" + cellValue;
            }
        });
        t.mapHeaders(new HashMap<Object, String>() {{
View Full Code Here

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
Copyright © 2018 www.massapi.com. 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.