Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Scenario 1 :
I have to insert comma in the values.
ex: 32825 o/p : 32,825
3281564 o/p : 3,281,564
Before third digit i have to place comma.
Scenario 2 :
I have to replace the values -7.8 to (7.8)
need to replace open and close brackets for minus values.
It worked after changing into this.
row11.EBITDA_MARGIN_Dec_17 .contains("-")?"("+row11.EBITDA_MARGIN_Dec_17 .replace("-","")+")": row11.EBITDA_MARGIN_Dec_17;
1:- if you were using tFileOutputExcel using to populate data,for the number filed you can specify Thousands separator.
2:- you can use the below one.
!row1.filed.equals("") || row1.filed!=null||row1.filed.contains("-")>0?"("+row1.filed.replace("-","")+")": row1.filed
It worked after changing into this.
row11.EBITDA_MARGIN_Dec_17 .contains("-")?"("+row11.EBITDA_MARGIN_Dec_17 .replace("-","")+")": row11.EBITDA_MARGIN_Dec_17;
try this
!row1.filed.equals("") || row1.filed!=null||row1.filed.contains("-")?"("+row1.filed.replace("-","")+")": row1.filed
It is working fine. But sometimes column will contain null values. so how to overcome null pointer exception.
Error after using the below code
String literal is not properly closed by a double-quote
!row1.filed.equals("") || row1.filed!=null||row1.filed.contains("-")?"(row1.field==null?row1.field"+row1.filed.replace("-","")+")"): row1.filed
try the below one.
!row1.filed.equals("") || row1.filed!=null||row1.filed.contains("-")?(row1.field==null?row1.field:"("+row1.filed.replace("-","")+")"): row1.filed