poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject svn commit: r1745350 - /poi/site/publish/spreadsheet/quick-guide.html
Date Tue, 24 May 2016 12:21:52 GMT
Author: nick
Date: Tue May 24 12:21:52 2016
New Revision: 1745350

URL: http://svn.apache.org/viewvc?rev=1745350&view=rev
Log:
Republish site

Modified:
    poi/site/publish/spreadsheet/quick-guide.html

Modified: poi/site/publish/spreadsheet/quick-guide.html
URL: http://svn.apache.org/viewvc/poi/site/publish/spreadsheet/quick-guide.html?rev=1745350&r1=1745349&r2=1745350&view=diff
==============================================================================
--- poi/site/publish/spreadsheet/quick-guide.html (original)
+++ poi/site/publish/spreadsheet/quick-guide.html Tue May 24 12:21:52 2016
@@ -2759,29 +2759,28 @@ the data to populate another drop down l
 </p>
        
 <pre class="code">
-  POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream("excel_with_embeded.xls"));
+  POIFSFileSystem fs = new POIFSFileSystem(new File("excel_with_embeded.xls"));
   HSSFWorkbook workbook = new HSSFWorkbook(fs);
   for (HSSFObjectData obj : workbook.getAllEmbeddedObjects()) {
       //the OLE2 Class Name of the object
       String oleName = obj.getOLE2ClassName();
       if (oleName.equals("Worksheet")) {
           DirectoryNode dn = (DirectoryNode) obj.getDirectory();
-          HSSFWorkbook embeddedWorkbook = new HSSFWorkbook(dn, fs, false);
+          HSSFWorkbook embeddedWorkbook = new HSSFWorkbook(dn, false);
           //System.out.println(entry.getName() + ": " + embeddedWorkbook.getNumberOfSheets());
       } else if (oleName.equals("Document")) {
           DirectoryNode dn = (DirectoryNode) obj.getDirectory();
-          HWPFDocument embeddedWordDocument = new HWPFDocument(dn, fs);
+          HWPFDocument embeddedWordDocument = new HWPFDocument(dn);
           //System.out.println(entry.getName() + ": " + embeddedWordDocument.getRange().text());
       }  else if (oleName.equals("Presentation")) {
           DirectoryNode dn = (DirectoryNode) obj.getDirectory();
-          SlideShow embeddedPowerPointDocument = new SlideShow(new HSLFSlideShow(dn, fs));
+          SlideShow&lt;?,?&gt; embeddedPowerPointDocument = new HSLFSlideShow(dn);
           //System.out.println(entry.getName() + ": " + embeddedPowerPointDocument.getSlides().length);
       } else {
           if(obj.hasDirectoryEntry()){
               // The DirectoryEntry is a DocumentNode. Examine its entries to find out what
it is
               DirectoryNode dn = (DirectoryNode) obj.getDirectory();
-              for (Iterator entries = dn.getEntries(); entries.hasNext();) {
-                  Entry entry = (Entry) entries.next();
+              for (Entry entry : dn) {
                   //System.out.println(oleName + "." + entry.getName());
               }
           } else {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message