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

Problem in JRXlsExporter


arbitary

Recommended Posts

I came across this while trying to export a report as xls. One of the cells have values 1A, 1B, 1C, 1D, 1E or 1F. The column that I am printing this in, is designated as String. When the report renders, all values are shown correctly, except for 1D and 1F, which are shown only as 1.

 

After putting debug statements in the JRXlsExporter file, I found that the flow is as follows:

 

1) method createTextCell --> isDetectCellType is false

 

2) Control goes to else part: isAutoDetectCellType which is true.

 

Here it first parses the value as Double. 1D and 1F are accepted as double and float values and shown as 1. Others are shown as 1A, 1B, 1C.

 

I understand that the best way is to have the control go into (1), where the cell type is detected as String/text. My question is - how is isDetectCellType set to true? If my column datatype in the layout is set to String, shouldn't this be String too??

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