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

Export Excel time format issue


r.reddy.galla

Recommended Posts

Hi,

1)I want to export data into excel format there i can see the numbers stored as tesxt format error.

for that i used  "net.sf.jasperreports.export.xls.detect.cell.type" then this issue been resolved.

But now time format is giving error 'd-MMM-yyyy h:mm a' exported as like 7-Jul-2017 10:27 a

it is not giving AM/PM format and simply displaying 'a'

2) percentage pattern error: value like 5.75 in database when i used pattern "#,##0%" this is (value*100) giving 575%

 

Please help us steps if any one these questions that would be greatly appreciated.

Thanks,

Ravi.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

1) set the net.sf.jasperreports.export.xls.pattern property for that element with the value "d-MMM-yyyy h:mm AM/PM"

2) Not sure what is the issue here. 5.75 really means 575% in percents.

If you need to display something like 6% instead of 5.75, you could place $F{myDatabaseField}/100.0 in your textfield instead of $F{myDatabaseField}, and use the "#,##0%" pattern

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