mirror of https://github.com/apache/poi.git
Add comment
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1647512 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a8522bb51e
commit
2668385b17
|
@ -105,6 +105,7 @@ public class WorkbookFactory {
|
|||
NPOIFSFileSystem fs = new NPOIFSFileSystem(file);
|
||||
return new HSSFWorkbook(fs.getRoot(), true);
|
||||
} catch(OfficeXmlFileException e) {
|
||||
// opening as .xls failed => try opening as .xlsx
|
||||
OPCPackage pkg = OPCPackage.open(file);
|
||||
return new XSSFWorkbook(pkg);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue