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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

how to read the numeric data from a tfileInputExcel component column. the column contains string as well as numbers

hi, 

i want to read the numerical data from the input column of an excel file. the column contains String data as well as Numerical data. i am not able to do this. please help me hoe to do this. I want to print the numerical data in a table format.

 

Thanks & Regards

Mastan

Labels (2)
4 Replies
TRF
Champion II
Champion II

Hi,

Define the input field as String datatype, then use a common Java conversion method to convert to the expected output format (Integer, Float, BigDecimal, ...).

You can define your own conversion method using a routine or if you don't have to reuse it elsewhere, you can do it using a single tJavaRow component.

Google will help you to find the desired conversoin Java code.

Anonymous
Not applicable
Author

Hi,

Thanks for your reply can you please share the sample job design for this, bcz i ma new to talend i wrote the code to catch the numeric data from the text file but it is not working in talend environment. my tjavarow code is

0683p000009Lsxr.png

Thanks & Regards

mastan

TRF
Champion II
Champion II

General design should be like this:

tFileInputExcel-->tJavaRow (or tMap)-->tLogRow (or anything else)

In tJavaRow you'll get row 1 by 1 from Excel file so you just have to operate the conversion.

This link may help as an example https://community.talend.com/t5/Design-and-Development/How-to-check-if-some-column-has-string-value-... but you can find many others from Google.

Anonymous
Not applicable
Author

Hi, 

thanks for your quick reply, but actually my requirement is capturing the numerical data from the input field. but the input field having the text and numeric data combined like the text file..i as sending the sample input and output pics..

Sample Output:0683p000009Lt1F.png0683p000009LtAa.png

Sample Input:

0683p000009Lt7G.png0683p000009LtAk.png

Please tell me one solution to achieve this output.

 

Thanks & Regards

Mastanaiah Shaik