Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

tFileInputExcel

Hi,
I am parsing a sales log, all columns seem to parse find to strings (just testing at the moment), but when I get to the column with a £ sign in it, it throws a parse exception:
Exception in component tFileInputExcel_7
java.text.ParseException: Unparseable number: "£888.40"
at java.text.NumberFormat.parse(Unknown Source)
at asd.generatecobrajobs_0_1.GenerateCobraJobs.tFileInputExcel_7Process(GenerateCobraJobs.java:1169)
at asd.generatecobrajobs_0_1.GenerateCobraJobs.runJobInTOS(GenerateCobraJobs.java:2159)
at asd.generatecobrajobs_0_1.GenerateCobraJobs.main(GenerateCobraJobs.java:1908)
I see others have had various signs fixed such as $ etc. I am using 5.1.2 and the bug still produces on various machines.
Any help would be greatly appreciated.
Labels (3)
6 Replies
Anonymous
Not applicable

Hi,
We have seen your error info. Something wrong with your data format "£888.40". Would you mind uploading the screenshot about your schema in component -tFileInputExcel_7,or you can check the code in studio to find the cause and we will track your issue.
Best regards
Sabrina
Anonymous
Not applicable

Hi Sabrina,
thanks for coming back to me, it is really appreciated. Please find attached pictures reflecting the configuration. I will attempt to find the code in question.
Anonymous
Not applicable

temp_row_tFileInputExcel_7 = df_tFileInputExcel_7
.format(numberFormat_tFileInputExcel_7
.parse(dataFormat_tFileInputExcel_7
.formatCellValue(
cell_tFileInputExcel_7,
workbook_tFileInputExcel_7
.getCreationHelper()
.createFormulaEvaluator())));

is the code in question throwing the error
Anonymous
Not applicable

Hi,
We have seen your related pics and code. All of your type are set as "String" which cause the issue.
format(numberFormat_tFileInputExcel_7
.parse(dataFormat_tFileInputExcel_7
.formatCellValue(

. As the code said, the data format is wrong.
Try to set your datatype of "£888.40" as float or others currency type.
Best regards
Sabrina
Anonymous
Not applicable

Thanks, I will do this. Though I was hoping to do this without having to format anything at all. Is there any way that the component can read this format?
Maybe if I output the source and adjust it?
Anonymous
Not applicable

Hi,
Maybe if I output the source and adjust it?

We don't do it before and what we can do is change the format into the right. You can take a try and would you mind giving the feedback result. All of us will be interested in it.
Best regards
Sabrina