I need to make an if loop that if the column in excel says ''cov'' it should take the values in the 14th column and calculate them together. The thing is, I know when I take the values they will come as a string and I need to parse them in to a double, how can I do that?
if(workbook.getSheet(0).getCell(0, rowno+1).getContents().equals("cov")){
for(int i=1; i<=8; i++){
String excel = workbook.getSheet(0).getCell(13, rowno+1).getContents();
System.out.println(excel);
rowno++;
}
}
It will print out the right values, but I cannot convert them nor calculate them together.