I am new to Apache POI. I am trying to reading xlsx file using xssf workbook. Its not reading some files and not throwing exception, its directly going to finally block. How to find out the exact root cause. Here's the line am using. Thanks in advance.
FileInputStream inputStream = new FileInputStream(file);
try {
Iterator<org.apache.poi.ss.usermodel.Row> rowIterator = null;
org.apache.poi.xssf.usermodel.XSSFWorkbook xlsxbook = new org.apache.poi.xssf.usermodel.XSSFWorkbook(inputStream);
sheet = xlsxbook.getSheetAt(0);
}
catch (Exception e) {
logger.log(Level.WARNING, "", e);
} finally {
try {
if (inputStream != null) {
inputStream.close();
}
} catch (Exception ioe) {
System.out.println(ioe);
}
}