mokhtar.sougrati Posted May 28, 2019 Share Posted May 28, 2019 Hi everyone, I have a problem with formatting numeric data after generating report with help of Excel exporter.For example, the 007450001394700030039786 string is showing as 7,45000139470003E+21 in Excel fileI even used <property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/> and i still have the problème.PS: (with priview in ireport i have no problème with this number it displays correctly)there is my code java:JRXlsExporter exporterXLS = new JRXlsExporter(); exporterXLS.setParameter(JRXlsExporterParameter.JASPER_PRINT, jasperPrint); exporterXLS.setParameter(JRXlsExporterParameter.OUTPUT_FILE_NAME, file_xls);// exporterXLS.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.true); exporterXLS.setParameter(JRXlsExporterParameter.IS_WHITE_PAGE_BACKGROUND, Boolean.TRUE); try { exporterXLS.exportReport(); } catch (JRException e) { throw e; } Link to comment Share on other sites More sharing options...
C-Box Posted May 28, 2019 Share Posted May 28, 2019 Hi... have you already tried to set an excel specific pattern at your field? Take a look here: http://jasperreports.sourceforge.net/sample.reference/xlsfeatures/ and also here... http://jasperreports.sourceforge.net/api/net/sf/jasperreports/engine/export/JRXlsAbstractExporter.html#PROPERTY_CELL_PATTERNhth + regards C-Box 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