milli Posted June 25, 2007 Share Posted June 25, 2007 Hi,I use java server faces I have this error with JExcel: javax.faces.el.EvaluationException: java.lang.IllegalAccessError: jxl/write/biff/WritableFontRecord.setStruckout(Z)V I don't use images in my report.Any idea? Thank you. Link to comment Share on other sites More sharing options...
aniruddh4u Posted June 26, 2007 Share Posted June 26, 2007 http://developers.sun.com/jscreator/learning/tutorials/2/reports.html this will help you Link to comment Share on other sites More sharing options...
milli Posted June 26, 2007 Author Share Posted June 26, 2007 Thank you for your suggestion.I've managed to make all function with the output in html and pdf and also in excel using the poi libraries.But I'd like to use the JExcel libraries, I suppose they uses less memory.Here is my code: JExcelApiExporter exporter = new JExcelApiExporter(); ByteArrayOutputStream xlsReport = new ByteArrayOutputStream();exporter.setParameter( net.sf.jasperreports.engine.JRExporterParameter.JASPER_PRINT, jasperPrint);exporter.setParameter(JExcelApiExporterParameter.IS_DETECT_CELL_TYPE,Boolean.TRUE);exporter.setParameter(JExcelApiExporterParameter.IS_REMOVE_EMPTY_SPACE_BETWEEN_ROWS,Boolean.TRUE) ;exporter.setParameter(JExcelApiExporterParameter.IS_WHITE_PAGE_BACKGROUND,Boolean.TRUE);exporter.setParameter(JExcelApiExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);exporter.setParameter( net.sf.jasperreports.engine.JRExporterParameter.OUTPUT_STREAM,xlsReport);exporter.exportReport(); byte[] bytes = xlsReport.toByteArray(); resp.setContentType("application/vnd.ms-excel"); resp.setContentLength(bytes.length); resp.setHeader("Content-disposition", "attachment; filename="" + filename + ".xls""); ServletOutputStream ouputStream = resp.getOutputStream();ouputStream.write(bytes, 0, bytes.length);ouputStream.flush();ouputStream.close();context.responseComplete(); Have I made something wrong?Thank you again for any help. Link to comment Share on other sites More sharing options...
lucianc Posted June 26, 2007 Share Posted June 26, 2007 You're probably using an old JExcelApi version. Try upgrading to the latest (or at least a 2.6.x version). HTH,Lucian Link to comment Share on other sites More sharing options...
milli Posted June 26, 2007 Author Share Posted June 26, 2007 I'm using jxl-2.6.4.jar. I don't know if I need other libraries to use JExcel. Thank you. Link to comment Share on other sites More sharing options...
lucianc Posted June 26, 2007 Share Posted June 26, 2007 Are you sure you don't also have another (older) JExcelApi jar on your classpath? JXL 2.6.4 seems to work fine.. Regards,Lucian Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now