Workbook wb = WorkbookFactory.create(fileInput) for (int i = 0; i < wb.getNumberOfSheets(); i++) { Sheet sheet = wb.getSheetAt(i); }