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 :
- Code: Select all
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
cause = java.io.FileNotFoundException: no such entry: "EncryptionInfo"
For what I have seen, the EncryptionInfo is used for password protected files but mine are not :/
I attached two .xls, I import the first one without problemes but not the second.
Appreciate your help on this.
A.L