I want to read values like 11610.1073
from excel using java and selenium. I tried below code but it throws me null pointer exception
when I am trying to parse that value and store it in array variable. I am able to read int
values but unable to do the same with the float
values. Below is my code:
StagePTDFTE.add(Float.parseFloat(row.getCell(2).getStringCellValue().toString()));
StagePTDFTEArray = new float[StagePTDFTE.size()];
for (int i = 0; i < StagePTDFTEArray.length; i++) {
StagePTDFTEArray[i] = Float.parseFloat(df.format(StagePTDFTE.get(i)));
}
Please let me know where I am going wrong and what should be the modifications required here. Thanks in advance :)