1 2 3 4 5 6 7 8 9 10
public int getRowCount(String sheetName){ int index = workbook.getSheetIndex(sheetName); if(index==-1) return 0; else{ sheet = workbook.getSheetAt(index); int number=sheet.getLastRowNum()+1; return number; } }