Return-Path: Delivered-To: apmail-poi-user-archive@www.apache.org Received: (qmail 59182 invoked from network); 18 Jul 2009 06:43:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Jul 2009 06:43:42 -0000 Received: (qmail 65870 invoked by uid 500); 18 Jul 2009 06:44:47 -0000 Delivered-To: apmail-poi-user-archive@poi.apache.org Received: (qmail 65829 invoked by uid 500); 18 Jul 2009 06:44:47 -0000 Mailing-List: contact user-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Users List" Delivered-To: mailing list user@poi.apache.org Received: (qmail 65819 invoked by uid 99); 18 Jul 2009 06:44:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Jul 2009 06:44:46 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Jul 2009 06:44:36 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MS3eZ-0004l2-IZ for user@poi.apache.org; Fri, 17 Jul 2009 23:44:15 -0700 Message-ID: <24545152.post@talk.nabble.com> Date: Fri, 17 Jul 2009 23:44:15 -0700 (PDT) From: "Satheesh.Subramaniam" To: user@poi.apache.org Subject: Reading Microsoft Word Document in JAVA MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: satheeshtech@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org im using follwing code to read word document in java using apache poi package.. import org.apache.poi.poifs.filesystem.*; import org.apache.poi.hwpf.*; import org.apache.poi.hwpf.extractor.*; import java.io.*; public class readDoc { public static void main( String[] args ) { String filesname = "Hello.doc"; POIFSFileSystem fs = null; try { fs = new POIFSFileSystem(new FileInputStream(filesname; //Couldn't close the braces at the end as my site did not allow it to close HWPFDocument doc = new HWPFDocument(fs); WordExtractor we = new WordExtractor(doc); String[] paragraphs = we.getParagraphText(); System.out.println( "Word Document has " + paragraphs.length + " paragraphs" ); for( int i=0; i(HeaderBlockReader.java:78) at org.apache.poi.poifs.filesystem.POIFSFileSystem.(POIFSFileSystem.java:83) how to solve this issue.. please suggest me .. its urgent.. Add to satheeshtech's Reputation -- View this message in context: http://www.nabble.com/Reading-Microsoft-Word-Document-in-JAVA-tp24545152p24545152.html Sent from the POI - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@poi.apache.org For additional commands, e-mail: user-help@poi.apache.org