Jump to content

Teodord - Please help!!!


yaramada123

Recommended Posts

Hi,

I am trying to export a 16 digit number into XLS, but it is getting exported as exponential number.

 

1. I used JXL api to open the sheet and edit the number so that it is displayed as normal number.

 

2. The problem I am facing is, If I am exporting 5000323421232345, the last digit is getting replaced with 0 instead of 5 as it is getting converted to exponential number 5.0000E+15 when Jasper exports it into XLS.

 

How do I get around this problem, I can turn of IS_AUTO_CELL_DETECT_TYPE as there are numbers in other columns. Please let me know if any one knows a solution for this.

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Hi,

I also faced the same problem what i did was,

 

We used to print 16 digit numbers as TxnNo:1234567890123456 and I added the ":" into the report before the field value like this

":"+$F{Field Name} and that solved the problem.

You also try to add some character but not space before your field value, it will surely work

Link to comment
Share on other sites

If you want to avoid both exponential conversion and text representation of your big number, there is another possibility: try to use the java.math.BigDecimal (or BigInteger - your number appears to be rather integer) type instead of Double. But, of course, try that only if your precision does fit into Excel's allowed limits, as Lucian said.

Post edited by: shertage, at: 2007/07/24 09:04

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