As i understood the short casting comes from the HSSFWorkbook implementation. So what one needs for more rows is a bigger number then a short (i.e. int) AND XSSFWorkbook.