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: 
mario_mirabile
Contributor
Contributor

tFileInputExcel reads formatted value instead numeric value in cell

I have a job which loops through an Excel spreadsheet reading one column at a time. The schema of the spreadsheet defines all columns as string, with the "Read real values for numbers" option checked.
One column contains floating point values formatted to display no decimal places. The data is read by a tJavaRow component, however I get only the displayed value passed to the tJavaRow from the tFileInputExcel.
If I change the display format in the spreadsheet so that at least one decimal place is displayed, I get the correct value, usually with more than one decimal place in the data.
Is there any way to get the tFileInputExcel to pass the underlying value in the cell rather than the displayed value?
thanks
Mario
Labels (3)
10 Replies
Anonymous
Not applicable

Hi,
Could you elaborate your case with an example with input and expected output values? You work flow is: tFileInputExcel-->tJavarow? What's the code in it? More information will be preferred.
Best regards
Sabrina
Anonymous
Not applicable

All APIs I know, read only one type of cell value. There is no option to read "what the user see". If you change the format in Excel typically you change the cell data type and mostly the content.
Again, you do not change only the display format in Excel, you usally change the entiere content!
mario_mirabile
Contributor
Contributor
Author

I have further tested this behaviour by simplifying the job to contain only a tFileInputExcel and a tlogRow. The test file consists of two numeric columns containing floating point numbers (eg 118269.8)
When the column in the spreadsheet is set to display 0 decimal places (displaying 118269) , the data displayed in the tLogRow is just the displayed value.
If the display format in the spreadsheet is changed to display one decimal place (without changing the data), the data displayed in the tLogRow changes to 118296.8.
This happens if the schema definition for the column in Talend is either string or float.
Talend v5.0.1, Windows XP, Excel 2003.
Looks like a bug to me.
Mario
Anonymous
Not applicable

Hi,
What is your expected result? Is your input 118269.8 in spreadsheet? In talend, there is no check in "String" type. If your input is 118269.8, the actual result in tlogrow is still 118269.8.
Best regards
Sabrina
mario_mirabile
Contributor
Contributor
Author

What I expect is the actual value in the cell. What I get is the formatted display value. I think my description of the problem is quite clear if you re-read my last post.
Mario
Anonymous
Not applicable

Hi,
I have made a testing on Talend Open Studio 5.0.1 r 74687 (Excel2007, window7 64 bit).
My input data is:
118269.8
118269
In talend studio, the work flow is :tfileinputExcel-->tlogrow and the job works well. Your screenshots will be highly appreciated.
Please see my screenshots for details
Best regards
Sabrina
0683p000009MDuy.png 0683p000009MDyv.png 0683p000009MEBU.png
mario_mirabile
Contributor
Contributor
Author

Your example shows exactly what I've described when the display format in Excel is set to include decimals. In my first screenshot, the value in the cell clearly contains decimals, but they are not picked up by Talend because of the display format.
In the second screenshot, the values are unchanged, but talend now displays the value according to the Excel display format.
Mario
0683p000009ME4F.jpg 0683p000009MEGY.jpg
Anonymous
Not applicable

Hi,
Have a try to check the box 'read real value for numbers' in the advanced settings tab of tFileInputExcel and read it with numeric data type and please give me your feedback.
Best regards
Sabrina
mario_mirabile
Contributor
Contributor
Author

That option is checked (as stated in my original post). Makes no difference to the behavior.