import org.apache.poi.POIXMLDocument;
import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.xslf.extractor.XSLFPowerPointExtractor;
public class FilePPTX {
public static void main(String[] args)
{
try
{
//word 2007 图片不会被读取, 表格中的数据会被放在字符串的最后
OPCPackage opcPackage = POIXMLDocument.openPackage("d:\\TestFile\\02.pptx");
XSLFPowerPointExtractor extractor = new XSLFPowerPointExtractor(opcPackage);
String text2007 = extractor.getText();
System.out.println(text2007);
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.xslf.extractor.XSLFPowerPointExtractor;
public class FilePPTX {
public static void main(String[] args)
{
try
{
//word 2007 图片不会被读取, 表格中的数据会被放在字符串的最后
OPCPackage opcPackage = POIXMLDocument.openPackage("d:\\TestFile\\02.pptx");
XSLFPowerPointExtractor extractor = new XSLFPowerPointExtractor(opcPackage);
String text2007 = extractor.getText();
System.out.println(text2007);
}
catch (Exception e)
{
e.printStackTrace();
}
}
}