Package should contain a content type part [M1.13]
Exception message:
Org.apache.poi.openxml4j.exceptions.InvalidFormatException: Package should contain a content type part [M1.13]
Cause of exception:
The difference in file formats between version 2007 excel and version 2003 excel results in:
HSSFWorkbook & HSSFSheet: supports xls format
XSSFWorkbook & XSSFSheet: xlsx format is supported.
Solution:
Workbook workbook = WorkbookFactory.create (fileInputStream ()); Sheet hssfSheet = workbook.getSheetAt (0)