[Solved] POI error: Package should contain a content type part [M1.13]

POI Error: Package should contain a content type part [M1.13]

// Not compatible with xls and xlsx
Workbook workbook = new XSSFWorkbook(multipartFile.getInputStream());

Change to this:

Workbook workbook = WorkbookFactory.create(multipartFile.getInputStream());

Done!

Read More: