// Create a new workbook Workbook workbook = new Workbook(); IWorksheet worksheet = workbook.getWorksheets().get(0); IRange range = worksheet.getRange("A5:B7"); // cell count is 6. int cellcount = range.getCount(); // cell count is 6. int cellcount1 = range.getCells().getCount(); // row count is 3. int rowcount = range.getRows().getCount(); // column count is 2. int columncount = range.getColumns().getCount();