0

I am trying to read an Excel file but I am getting this error:

org.apache.poi.POIXMLException: org.apache.poi.openxml4j.exceptions.InvalidFormatException: Package should contain a content type part [M1.13].

public ArrayList<ArrayList<ArrayList<String>>> ReadExcelSheetWise(String callFor,String fileName,MultipartFile multipartFile) throws Exception{
    ArrayList<String> colList= null;
    ArrayList<ArrayList<String>> rowList = null;
    ArrayList<ArrayList<ArrayList<String>>> sheetList = new ArrayList<ArrayList<ArrayList<String>>>();
    if(fileName.contains(".xlsx") ||fileName.contains(".XLSX")){
        XSSFWorkbook workbook = new XSSFWorkbook(multipartFile.getInputStream());

    }
}

Note: The Excel file is protected.

Jørgen R
  • 10,568
  • 7
  • 42
  • 59
Pankaj Dagar
  • 87
  • 10

0 Answers0