On Tue, 25 Oct 2005, prakash jaya wrote:
i want to extract text from ppt,Word files.Is it possible to extract
text from word,ppt files by this "poi" library.i would be thankful if
someone provide the solution.plz give solution to my problem.
PowerPoint Text Extraction:
http://jakarta.apache.org/poi/hslf/quick-guide.html
Word Text Extraction:
import org.apache.poi.hwpf.usermodel.*;
import org.apache.poi.hwpf.HWPFDocument;
public String getWordText(InputStream inputStream) {
HWPFDocument wdoc = new HWPFDocument(inputStream);
String docText = extractText(wdoc);
return docText;
}
For both of these, you'll need a recent CVS build, and you'll need both
the main JAR, and the scratchpad JAR. If you don't fancy doing that
yourself, grab copies from:
http://encore.torchbox.com/poi-cvs-build/
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/