Add comment

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1647512 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2014-12-23 09:26:22 +00:00
parent 95c9b9991a
commit ed60f5cb08

View File

@ -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);
} }