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 <field name="InspectionFullNumber" class="java.lang.Object"> <fieldDescription><![CDATA[]]></fieldDescription> 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.
I have changed the fields to correspond t the type of data in the column on the spreadshhet but I am still receivng thie error - Cannot get a text value from a numeric cell
More assistance requested.
Jim P.
Hello Jim,
Did you got any solution for this,i am also stuck
Hi,
you need to change the type of the field from the field list in your report not int spreadsheet.