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
95c9b9991a
commit
ed60f5cb08
@ -105,6 +105,7 @@ public class WorkbookFactory {
|
|||||||
NPOIFSFileSystem fs = new NPOIFSFileSystem(file);
|
NPOIFSFileSystem fs = new NPOIFSFileSystem(file);
|
||||||
return new HSSFWorkbook(fs.getRoot(), true);
|
return new HSSFWorkbook(fs.getRoot(), true);
|
||||||
} catch(OfficeXmlFileException e) {
|
} catch(OfficeXmlFileException e) {
|
||||||
|
// opening as .xls failed => try opening as .xlsx
|
||||||
OPCPackage pkg = OPCPackage.open(file);
|
OPCPackage pkg = OPCPackage.open(file);
|
||||||
return new XSSFWorkbook(pkg);
|
return new XSSFWorkbook(pkg);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user