We produce an Excel report with Jasper. One column is defined to be a text field with:
* Expression: $F{closingDate}
* Evaluation Time: Now
* Blank When NULL
* Strech With Overflow
* Pattern "dd.MM.yyyy"
In the model, the 'closingDate' is of type 'java.util.Date' and some values are NULL.
If you look at the attached file, you'll see something pretty interesting: Apparently empty cells aren't empty until there has been an non-empty cell. This causes formulas to no longer work, as you can't detect whether a cell is empty or not. As it's seen as non-empty, excel tries (and fails) to use that "empty" value for calculations.
Investigating the underlying XML reveals, that the non-empty empty cells contain a reference to a shared string like so:
0
which is defined as:
Whereas truly empty cells have no tag at all, or (you can test this manually) an empty tag (so no shared string reference).
Is there anything that I can do about it or is it truly a bug in Jasper?
Recommended Comments
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 accountSign in
Already have an account? Sign in here.
Sign In Now