Gerando relatorio Excel com POI passando uma String

1 resposta
A

Boa tarde,

Estou desenvolvendo um sistema web e quero que ele gere um relatorio em Excel usando POI so que passando uma String

se alguem puder ajudar

Muito Obrigado

1 Resposta

A
Seria +- assim:
public boolean RelExcel(String rel) {
        try {
            net.sf.jasperreports.engine.export.JExcelApiExporter exporter = new net.sf.jasperreports.engine.export.JExcelApiExporter();
            exporter.setParameter(net.sf.jasperreports.engine.export.JExcelApiExporterParameter.JASPER_PRINT, rel);
            exporter.setParameter(net.sf.jasperreports.engine.export.JExcelApiExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
            exporter.setParameter(net.sf.jasperreports.engine.export.JExcelApiExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_COLUMNS, Boolean.TRUE);
            exporter.setParameter(net.sf.jasperreports.engine.export.JExcelApiExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.FALSE);
            exporter.setParameter(net.sf.jasperreports.engine.export.JExcelApiExporterParameter.IS_FONT_SIZE_FIX_ENABLED, Boolean.TRUE);
            exporter.setParameter(net.sf.jasperreports.engine.export.JExcelApiExporterParameter.IS_COLLAPSE_ROW_SPAN, Boolean.TRUE);
            exporter.exportReport();

            return true;
        } catch (Exception ex) {
            this.recordError("Erro ao emitir relatório: " , ex);
            return false;
        }

    }

essa String q eu estou passando ja esta toda tabulada

Criado 8 de abril de 2011
Ultima resposta 8 de abr. de 2011
Respostas 1
Participantes 1