Jump to content
We've recently updated our Privacy Statement, available here ×
  • Exporting a report to Excel file stores number as text


    Dhiraj Pahlani
    • Features: Exporters Version: v8.0.0 Product: JasperReports® Server

    Problem:
    We are exporting reports to Excel file for further analysis using formulas. However, the exported file stores number as text. Is there a way to retain the type of the cell?

    Solution:
    We can set the below property at the report level to retain the cell type in the exported Excel file.
    net.sf.jasperreports.export.xls.detect.cell.type=true

    The same property can also be set at the global level by adding the property in the jasperreports.properties file (<jasperserver-pro>/WEB-INF/classes/), saving the changes, and restarting the server for the changes to reflect.

    Attached excelReport.jrxml report is a sample report which can be run using the Foodmart database, and its exported Excel file, excelReport.xlsx, for reference.
    ______________________________________________________________________________________________________________________
    Ref. Case #02250326

    excelReport.jrxml excelReport.xlsx


    User Feedback

    Recommended Comments

    There are no comments to display.



    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...