Hi Srinivas,
I'm also new to Poi(hwpf), but try
this(from Quicktest.java hwpf package ):
kind regards wolfgang
p.s. you will need a complete(with hwpf)jar file, of course..
first, get the source and build it and include the jar in your
classpath or ide
-----------------------------
import java.io.*;
import org.apache.poi.hwpf.usermodel.*;
import org.apache.poi.hwpf.*;
......
HWPFDocument doc = new HWPFDocument(new
FileInputStream("..pathtoyourdoc\\1.doc"));
Range r = doc.getRange();
System.out.println("Example you supplied:");
System.out.println("---------------------");
for (int x = 0; x < r.numSections(); x++) {
Section s = r.getSection(x);
for (int y = 0; y < s.numParagraphs(); y++) {
Paragraph p = s.getParagraph(y);
for (int z = 0; z < p.numCharacterRuns(); z++) {
//character run
CharacterRun run = p.getCharacterRun(z);
//character run text
String text = run.text();
// show us the text
System.out.print(text);
}//for
// use a new line at the paragraph break
System.out.println();
}//for
}//for
}
catch(Throwable t){
.....
>
>
> Hi guys,
>
> I am new in POI application developement .Now i want to read from word
file and write to word file data.Is it Possible .If possible Please tell me
the way of reading and writing and also please tell me the references site
adderess.
>
> Please tell me if u know How to install POI and what are the jar files to
configure?????
>
> Thanks to list for replay to me....
>
> Thanks
> Srinivas
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail - 50x more storage than other providers!
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
----- Original Message -----
From: "Srinivas Rao" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 01, 2004 7:46 AM
Subject: New to POI Please help me ......
>
> Hi guys,I am new in POI application developement .Now i want to read from
word file and write to word file data.Is it Possible .If possible Please
tell me the way of reading and writing and also please tell me the
references site adderess.Please tell me if u know How to install POI and
what are the jar files to configure?????Thanks to list for replay to
me....ThanksSrinivas
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]