Jump to content
We've recently updated our Privacy Statement, available here ×

Number in excel export


mokhtar.sougrati

Recommended Posts

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 file

I 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

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...