]> source.dussan.org Git - poi.git/commitdiff
Add a NPOIFS constructor to WorkbookFactory, to match the regular POIFS one
authorNick Burch <nick@apache.org>
Sun, 11 Dec 2011 08:16:32 +0000 (08:16 +0000)
committerNick Burch <nick@apache.org>
Sun, 11 Dec 2011 08:16:32 +0000 (08:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1212976 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/ss/usermodel/WorkbookFactory.java

index 6b86e4de7db64455801e515bb8525158537c3e03..41f70d92bbe0078271823e7746562a5fd5438ebe 100644 (file)
@@ -42,6 +42,12 @@ public class WorkbookFactory {
        public static Workbook create(POIFSFileSystem fs) throws IOException {
                return new HSSFWorkbook(fs);
        }
+       /**
+        * Creates an HSSFWorkbook from the given NPOIFSFileSystem
+        */
+       public static Workbook create(NPOIFSFileSystem fs) throws IOException {
+               return new HSSFWorkbook(fs.getRoot(), true);
+       }
        /**
         * Creates an XSSFWorkbook from the given OOXML Package
         */