Search in sources :

Example 1 with POIXMLTextExtractor

use of org.apache.poi.POIXMLTextExtractor in project poi by apache.

the class XSLFPowerPointExtractor method main.

public static void main(String[] args) throws Exception {
    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();
}
Also used : POIXMLTextExtractor(org.apache.poi.POIXMLTextExtractor) XSLFSlideShow(org.apache.poi.xslf.usermodel.XSLFSlideShow)

Example 2 with POIXMLTextExtractor

use of org.apache.poi.POIXMLTextExtractor in project poi by apache.

the class XSSFEventBasedExcelExtractor method main.

public static void main(String[] args) throws Exception {
    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();
}
Also used : POIXMLTextExtractor(org.apache.poi.POIXMLTextExtractor)

Example 3 with POIXMLTextExtractor

use of org.apache.poi.POIXMLTextExtractor in project poi by apache.

the class XSSFExcelExtractor method main.

public static void main(String[] args) throws Exception {
    if (args.length < 1) {
        System.err.println("Use:");
        System.err.println("  XSSFExcelExtractor <filename.xlsx>");
        System.exit(1);
    }
    OPCPackage pkg = OPCPackage.create(args[0]);
    POIXMLTextExtractor extractor = new XSSFExcelExtractor(pkg);
    try {
        System.out.println(extractor.getText());
    } finally {
        extractor.close();
    }
}
Also used : POIXMLTextExtractor(org.apache.poi.POIXMLTextExtractor) OPCPackage(org.apache.poi.openxml4j.opc.OPCPackage)

Example 4 with POIXMLTextExtractor

use of org.apache.poi.POIXMLTextExtractor in project poi by apache.

the class XDGFVisioExtractor method main.

public static void main(String[] args) throws IOException {
    if (args.length < 1) {
        System.err.println("Use:");
        System.err.println("  XDGFVisioExtractor <filename.vsdx>");
        System.exit(1);
    }
    POIXMLTextExtractor extractor = new XDGFVisioExtractor(POIXMLDocument.openPackage(args[0]));
    System.out.println(extractor.getText());
    extractor.close();
}
Also used : POIXMLTextExtractor(org.apache.poi.POIXMLTextExtractor)

Example 5 with POIXMLTextExtractor

use of org.apache.poi.POIXMLTextExtractor in project poi by apache.

the class XWPFWordExtractor method main.

public static void main(String[] args) throws Exception {
    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();
}
Also used : POIXMLTextExtractor(org.apache.poi.POIXMLTextExtractor)

Aggregations

POIXMLTextExtractor (org.apache.poi.POIXMLTextExtractor)8 OPCPackage (org.apache.poi.openxml4j.opc.OPCPackage)2 XWPFWordExtractor (org.apache.poi.xwpf.extractor.XWPFWordExtractor)2 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 Locale (java.util.Locale)1 CloseShieldInputStream (org.apache.commons.io.input.CloseShieldInputStream)1 POIXMLDocument (org.apache.poi.POIXMLDocument)1 POIXMLException (org.apache.poi.POIXMLException)1 UnsupportedFileFormatException (org.apache.poi.UnsupportedFileFormatException)1 OldExcelFormatException (org.apache.poi.hssf.OldExcelFormatException)1 InvalidFormatException (org.apache.poi.openxml4j.exceptions.InvalidFormatException)1 OpenXML4JException (org.apache.poi.openxml4j.exceptions.OpenXML4JException)1 XDGFVisioExtractor (org.apache.poi.xdgf.extractor.XDGFVisioExtractor)1 XSLFPowerPointExtractor (org.apache.poi.xslf.extractor.XSLFPowerPointExtractor)1 XMLSlideShow (org.apache.poi.xslf.usermodel.XMLSlideShow)1 XSLFSlideShow (org.apache.poi.xslf.usermodel.XSLFSlideShow)1 XSSFBEventBasedExcelExtractor (org.apache.poi.xssf.extractor.XSSFBEventBasedExcelExtractor)1 XSSFEventBasedExcelExtractor (org.apache.poi.xssf.extractor.XSSFEventBasedExcelExtractor)1 XSSFExcelExtractor (org.apache.poi.xssf.extractor.XSSFExcelExtractor)1