Jasperreport Excel (.xlsx) datasource
Posted on June 11, 2014 at 10:30pm
I am trying to generate a report using excel(.xlsx) datasource .I have been able to create the datasource in iReport. I add the Report Query by clicking the "Get Field from datasource" button.
And all the fields gets generated as needed. But when i click on preview data it throws an error:
java.lang.IllegalStateException: Cannot get a text value from a numeric cell.
The .xlsx file contains some column which have both integer and string values and I think this is the reason for exception.Is there any way to get all the column values as string or any other workaround?
I have tried declaring in jrxml but then too no help.
I really appreciate any pointer
I suspect there should be something to set the cell type to CELL_TYPE_FORMULA before reading the cell content.