public int getNumberOfRows ( final String fileName , final String sheetName ) throws IOException { LOG . info ( "Getting the number of rows from:" + fileName + " sheet: " + sheetName ) ; Workbook workbook = getWorkbook ( fileName ) ; Sheet sheets = workbook . getSheet ( sheetName ) ; return sheets . getPhysicalNumberOfRows ( ) ; }
Gets the number of rows populated within the supplied file and sheet name .