Hello everyone,
I have tried to import several .xls files with the SpreadsheetMLPackage.load(File file) methods. So far, I don't have any problems with .xlsx files and some .xls but for the majority of the .xls files, I have the same error :
private SpreadsheetMLPackage openXlsxXslx4J() throws FileNotFoundException, Docx4JException {
SpreadsheetMLPackage pkg = null;
if(pathFile!=null && !pathFile.isEmpty()){
File file = new File(pathFile);
if(file!=null){
pkg = SpreadsheetMLPackage.load(file);
}
}
return pkg;
}
org.docx4j.openpackaging.exceptions.Docx4JException: Problem reading compound file ...