Package org.apache.poi

Examples of org.apache.poi.POIXMLTextExtractor


    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("  XSLFPowerPointExtractor <filename.pptx>");
      System.exit(1);
    }
    POIXMLTextExtractor extractor =
      new XSLFPowerPointExtractor(
          new XSLFSlideShow(args[0]));
    System.out.println(extractor.getText());
    extractor.close();
  }
View Full Code Here

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

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

               return;
            }
            metadata.set(Metadata.CONTENT_TYPE, type.toString());

            // Have the appropriate OOXML text extractor picked
            POIXMLTextExtractor poiExtractor = ExtractorFactory.createExtractor(pkg);
           
            POIXMLDocument document = poiExtractor.getDocument();
            if (poiExtractor instanceof XSSFEventBasedExcelExtractor) {
               extractor = new XSSFExcelExtractorDecorator(
                   context, (XSSFEventBasedExcelExtractor)poiExtractor, locale);
            } else if (document == null) {
               throw new TikaException(
View Full Code Here

               return;
            }
            metadata.set(Metadata.CONTENT_TYPE, type.toString());

            // Have the appropriate OOXML text extractor picked
            POIXMLTextExtractor poiExtractor = ExtractorFactory.createExtractor(pkg);
           
            POIXMLDocument document = poiExtractor.getDocument();
            if (poiExtractor instanceof XSSFEventBasedExcelExtractor) {
               extractor = new XSSFExcelExtractorDecorator(
                   context, (XSSFEventBasedExcelExtractor)poiExtractor, locale);
            } else if (document == null) {
               throw new TikaException(
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.