i coud not read total rows some rows is jumbed
i use the following code to read excel sheet but i noticed there are some rows are not read i dont know the reason i used while loop and counter(i) but counter do not increase by 1 for all loop it jump some rows without certain criteria
int totalNumberOfRows = sheet1.getLastRowNum();
Log.d(TAG, "RowsNo: " + totalNumberOfRows);
int i = 6;
while (i <= totalNumberOfRows) {
if (sheet1.getRow(i).getCell(16).getCellTypeEnum() == CellType.NUMERIC) {
double duration = sheet1.getRow(i).getCell(16).getNumericCellValue();
if (duration > .91 && duration < 1) {
double status = sheet1.getRow(i).getCell(8).getNumericCellValue();
if (status == 60 || status == 72 || status == 73 || status == 101) {
System.out.println("if succeed");
Double telephone = sheet1.getRow(i).getCell(2).getNumericCellValue();
int tel = telephone.intValue();
System.out.println("telephone is" + tel);
}
}
System.out.println("Test Data From Excel" + duration);
System.out.println("Row Number" + i);
} else {
System.out.println("Not Numeric");
}
i++;
}