I've been using JasperReports for a little while now and everything seems to work great, however, today I tried to export my report in the XLSX format and noticed that the formatting of my number cells was not quite right.
I have a few cells that all contain doubles, I have tried using the following to get the cells to format correctly:
- reportExporter.setParameter(JExcelApiExporterParameter.IS_DETECT_CELL_TYPE, Boolean.TRUE);
- set the property (net.sf.jasperreports.export.xls.detect.cell.type) to TRUE in the report template;
- set the cell pattern to #####0.00.
I have tried each of these things individually and all combinations, but no matter what my numeric values (Doubles) are formatted as currency in my XLSX report. Quite strangely I might add, although formatted as currency, the currency 'unit' is not displayed in the cell, and I get Excel warnings that I have numbers stored as text. I don't have any of these problems when I change the JRExporter from an XLSX exporter to an XLS exporter.
I have attached a copy of both files to show you what I mean exactly. They are both attached in XLS format, but I have checked using a copy of Excel 2007 and the cells are definately formatted as currency before conversion.
Can anyone help or advise me on what else I could try?