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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Error with Format Pourcentage from Excel to Number in new Excel

Hello, 

 

I have an error that i don't unterstand : 

I did : a fileInputExcel => tMap => tfileOutputExcel.

I wanted retrieve a column with pourcentages (with a single line to unterstand the error : header : 5 Limit : 1)

0683p000009LxcJ.png

 

Then, in tMap, I put Pourcentage in String because in log console, it indicates the error For input : String. At the beginning, I put in Double and also in Float.

0683p000009LxcO.png

 

I run the job : 

0683p000009LxTS.png

Normally, I should have : 0,47 (or 0,468). From where goes out 4.475? 4.7? 0.8?

There is a single line....

 

 

Thanks in advance ! 

Labels (2)
15 Replies
Anonymous
Not applicable
Author

 @manodwhb

With tMap settings :

 

0683p000009LxdH.png0683p000009LxdM.png

Anonymous
Not applicable
Author

@rhall  

@manodwhb 

 

Maybe you have an idea?

Anonymous
Not applicable
Author

I have a suspicion that your system settings are wrong for the data you are working with.

 

Can you run this code in a tJava in a blank Talend job and show us what you get?....

java.text.DecimalFormat decFormat = new java.text.DecimalFormat();
        java.text.DecimalFormatSymbols decSymbols = decFormat.getDecimalFormatSymbols();           
        System.out.println("Decimal separator is : " + decSymbols.getDecimalSeparator());
        System.out.println("Thousands separator is : " + decSymbols.getGroupingSeparator());
Anonymous
Not applicable
Author

@rhall

 

0683p000009LxdR.png

Anonymous
Not applicable
Author

Right, that is your cause. Your values are read as Strings with a "." as the decimal separator, but your system is expecting to convert using "," as the decimal separator. 

Anonymous
Not applicable
Author

You are right. i check in advanced settings on the fileinputexcel : 

Thousands Separator : ""

Decimal Separator : "." instead of ",".

And i put all columns in string

And Bingo ! It works! 

phew!