import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import org.apache.poi.hslf.extractor.PowerPointExtractor;
// 读取ppt
public class FilePPT{
public static void main(String[] args) throws Exception {
try
{
InputStream is = new FileInputStream("d:\\TestFile\\01.ppt");
PowerPointExtractor we = new PowerPointExtractor(is);
System.out.println(we.getText());
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
catch (IOException e)
{
e.printStackTrace();
}
}
}
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import org.apache.poi.hslf.extractor.PowerPointExtractor;
// 读取ppt
public class FilePPT{
public static void main(String[] args) throws Exception {
try
{
InputStream is = new FileInputStream("d:\\TestFile\\01.ppt");
PowerPointExtractor we = new PowerPointExtractor(is);
System.out.println(we.getText());
}
catch (FileNotFoundException e)
{
e.printStackTrace();
}
catch (IOException e)
{
e.printStackTrace();
}
}
}