Jump to content

jasper reports export to excel number format is not correct in formaula bar


versha

Recommended Posts

I am using

JasperReport 5.6.1

java 1.8

Ms-office 2007

Exporting to MS excel

I have set exporterXLS.setParameter(JRXlsExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE);

Patternn used --> #,##0.000

Cell display --> 1.700

Formula Bar display --> 1.70000004768371

But it should show --> 1.700

Float data type is used in java.

Excel file extension used--> ".xls"

content type --> "application/vnd.ms-excel"

I have also tried --> ".xlsx" and content type --> "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"

What's wrong?

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Actually nothing seems wrong about that. The actual value is 1.70000004768371 on report and report show that value 1.700 because of the pattern you use. So exported excel has the same behavior. actual value ise 1700...71 and formula bar shows that value but in cell, it shows 1.700 like there is a pattern. Everyting seems perfect to me :)

Link to comment
Share on other sites

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