Package org.apache.poi

Examples of org.apache.poi.POIXMLTextExtractor


        if(args.length < 1) {
            System.err.println("Use:");
            System.err.println("  XSSFEventBasedExcelExtractor <filename.xlsx>");
            System.exit(1);
        }
        POIXMLTextExtractor extractor =
            new XSSFEventBasedExcelExtractor(args[0]);
        System.out.println(extractor.getText());
        extractor.close();
    }
View Full Code Here


    if(args.length < 1) {
      System.err.println("Use:");
      System.err.println("  XSSFEventBasedExcelExtractor <filename.xlsx>");
      System.exit(1);
    }
    POIXMLTextExtractor extractor =
      new XSSFEventBasedExcelExtractor(args[0]);
    System.out.println(extractor.getText());
  }
View Full Code Here

    if(args.length < 1) {
      System.err.println("Use:");
      System.err.println("  HXFWordExtractor <filename.docx>");
      System.exit(1);
    }
    POIXMLTextExtractor extractor =
      new XWPFWordExtractor(POIXMLDocument.openPackage(
          args[0]
      ));
    System.out.println(extractor.getText());
  }
View Full Code Here

        if(args.length < 1) {
            System.err.println("Use:");
            System.err.println("  XSSFExcelExtractor <filename.xlsx>");
            System.exit(1);
        }
        POIXMLTextExtractor extractor =
                new XSSFExcelExtractor(args[0]);
        System.out.println(extractor.getText());
    }
View Full Code Here

    if(args.length < 1) {
      System.err.println("Use:");
      System.err.println("  XSSFEventBasedExcelExtractor <filename.xlsx>");
      System.exit(1);
    }
    POIXMLTextExtractor extractor =
      new XSSFEventBasedExcelExtractor(args[0]);
    System.out.println(extractor.getText());
  }
View Full Code Here

        if(args.length < 1) {
            System.err.println("Use:");
            System.err.println("  XSSFExcelExtractor <filename.xlsx>");
            System.exit(1);
        }
        POIXMLTextExtractor extractor =
                new XSSFExcelExtractor(args[0]);
        System.out.println(extractor.getText());
    }
View Full Code Here

        if(args.length < 1) {
            System.err.println("Use:");
            System.err.println("  XSSFEventBasedExcelExtractor <filename.xlsx>");
            System.exit(1);
        }
        POIXMLTextExtractor extractor =
            new XSSFEventBasedExcelExtractor(args[0]);
        System.out.println(extractor.getText());
        extractor.close();
    }
View Full Code Here

    if(args.length < 1) {
      System.err.println("Use:");
      System.err.println("  XWPFWordExtractor <filename.docx>");
      System.exit(1);
    }
    POIXMLTextExtractor extractor =
      new XWPFWordExtractor(POIXMLDocument.openPackage(
          args[0]
      ));
    System.out.println(extractor.getText());
    extractor.close();
  }
View Full Code Here

        Locale locale = context.get(Locale.class, Locale.getDefault());
      
        try {
            OOXMLExtractor extractor;

            POIXMLTextExtractor poiExtractor;
            if(stream instanceof TikaInputStream &&
                  ((TikaInputStream)stream).getOpenContainer() != null) {
               poiExtractor = ExtractorFactory.createExtractor(
                    (OPCPackage)((TikaInputStream)stream).getOpenContainer()
               );
            } else {
               poiExtractor = (POIXMLTextExtractor) ExtractorFactory.createExtractor(stream);
            }
           
            POIXMLDocument document = poiExtractor.getDocument();
            if (document instanceof XSLFSlideShow) {
                extractor = new XSLFPowerPointExtractorDecorator(
                        (XSLFPowerPointExtractor) poiExtractor);
            } else if (document instanceof XSSFWorkbook) {
                extractor = new XSSFExcelExtractorDecorator(
View Full Code Here

    if(args.length < 1) {
      System.err.println("Use:");
      System.err.println("  HXFPowerPointExtractor <filename.pptx>");
      System.exit(1);
    }
    POIXMLTextExtractor extractor =
      new XSLFPowerPointExtractor(
          new XSLFSlideShow(args[0]));
    System.out.println(extractor.getText());
  }
View Full Code Here

TOP

Related Classes of org.apache.poi.POIXMLTextExtractor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.