JRXlsExporter exporter = new JRXlsExporter();
gera esse erro na tela....
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet execution threw an exception
root cause
java.lang.NoClassDefFoundError: org/apache/poi/hssf/usermodel/HSSFCellStyle
com.struts.action.RelComissaoAction.geraRelatorioExcel(RelComissaoAction.java:146)
com.struts.action.RelComissaoAction.execute(RelComissaoAction.java:125)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
e uma parte do meu código é:
OutputStream output = new FileOutputStream(new File(caminho));
ByteArrayOutputStream xlsReport = new ByteArrayOutputStream();
byte bytes[] = new byte[10];
// exportação para excel
JRXlsExporter exporterXLS = new JRXlsExporter();
exporterXLS.setParameter(JRXlsExporterParameter.JASPER_PRINT, print);
exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_STREAM, xlsReport);
exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_FILE, caminho);
exporterXLS.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.FALSE);
exporterXLS.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.TRUE);
exporterXLS.setParameter(JRXlsExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS, Boolean.TRUE);
exporterXLS.exportReport();
// converte para bytes
bytes = xlsReport.toByteArray();
xlsReport.close();
// grava os bytes na saída
output.write( bytes, 0, bytes.length );
output.flush();
output.close();
Alguém pode me ajudar???
