java.io.IOException: It is not a valid excel2007 file.org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
From the exception you posted, we think maybe there is some kind of conflict with your dom4j library. Would you please check and make sure there is only one dom4j library in your classpath (commonly, it should be dom4j-1.6.1.jar). Also, please check whether your dom4j library can work fine by parsing a simple xml file without referencing to Aspose.Cells: e.g import org.dom4j.Document; import org.dom4j.io.SAXReader; … SAXReader reader = new SAXReader(); Document doc = reader.read(inputStream); //here inputStream can be a FileInputStream built from one xml file …