Jasper XLS export - Cell value exceeds character limit

Cross posted at http://stackoverflow.com/questions/21433647/jasper-xls-export-cell-value-exceeds-character-limit

I export my data using jasper reports to a xls file from java. In one of the cells the data exceeds the character range supported in xls format (32,767).

When I use the below code to fill the report it exports all the data into a single cell.

print = JasperFillManager.fillReport(jasperReport, inputParams, dataSource);

obviously MS Excel and Open Office Calc don't open this file properly.

But when I use the below code it is exported by splitting the data in the column to approximately 3000 characters, and adding it to multiple rows (retaining the same data for other columns and changing this column alone.) not only in xls but in other formats also.

print = JasperFillManager.fillReport(jasperReport, new HashMap(), dataSource);

In the original 'inputParams' map I filled a few details like generated time, page number to be used in report header/footer which will be used in other formats like pdf but not in xls. So this should not be the reason.

I did some search on this, but don't see anybody else reporting this behavior.

Has any one else experienced this behavior? Why is this difference?

What should I do get this same splitting behavior even when I use 'inputParams'?

Version details:

Jasper - 2.0.5

POI - 3.0.1 Java 1.5

kam.717's picture
Joined: Jan 29 2014 - 6:50am
Last seen: 9 years 1 month ago

0 Answers:

No answers yet