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 has null values.
error :
java.lang.NullPointerException
this should fix for the null pointer exception row1.filed
if you still gets you have look for other columns may be causing null pointer exception.
!row1.filed.equals("") || row1.filed!=null||row1.filed.contains("-")?"("+row1.filed.replace("-","")+")": row1.filed
still the same error.
But i want to load the null values into the excel without getting null exception error.
OR
Is there any other method to convert negative values to () brackets.
@Darmesh, i am able to get with below expresion. please check
(!row3.newColumn1.equals("") || row3.newColumn1!=null) &&row3.newColumn1.contains("-")?"("+row3.newColumn1.replace("-","")+")": row3.newColumn1