You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Georgios Samaritakis <sa...@ics.forth.gr> on 2005/02/25 17:08:07 UTC

Downloaded POI-Trying to integrate HWPF

Hello all

I've just downloaded POI 2.5.1. I want an API to work with Word files so 
the next step would be to download HWPF. Well I'm not sure what to do next.
 I'm supposed to get some files from a CVS or something and then build a 
new POI jar file??? It all sounds Greek to me ;)... Anyway could someone 
explain to me in plain English how to make HWPF work for me?

P.S. I would like to be able to write a program like tha following that 
works (tried using textmining...):

import java.lang.*;
import java.io.*;

class hello {
    public static void main(String[] args) {
    FileInputStream in = new FileInputStream ("test.doc");
WordExtractor extractor = new WordExtractor();

String str = extractor.extractText();
        System.out.println(str); //Display the string.
    }
}

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Re: Downloaded POI-Trying to integrate HWPF

Posted by Georgios Samaritakis <sa...@ics.forth.gr>.
O/H Georgios Samaritakis έγραψε:

> Hello all
>
> I've just downloaded POI 2.5.1. I want an API to work with Word files 
> so the next step would be to download HWPF. Well I'm not sure what to 
> do next.
> I'm supposed to get some files from a CVS or something and then build 
> a new POI jar file??? It all sounds Greek to me ;)... Anyway could 
> someone explain to me in plain English how to make HWPF work for me?
>
> P.S. I would like to be able to write a program like tha following 
> that works (tried using textmining...):
>
> import java.lang.*;
> import java.io.*;
>
> class hello {
>    public static void main(String[] args) {
>    FileInputStream in = new FileInputStream ("test.doc");
> WordExtractor extractor = new WordExtractor();
>
> String str = extractor.extractText();
>        System.out.println(str); //Display the string.
>    }
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
>


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Re: Downloaded POI-Trying to integrate HWPF

Posted by Georgios Samaritakis <sa...@ics.forth.gr>.
O/H David W. Brown έγραψε:

>Hello Georgios, I have not worked with the HWPF but I do have some experience with POI/HSSF. I not a POI expert but I am a Java expert. I found the going with POI a lot easier if you just opt for the POI binary download as opposed the building from the POI source and creating your own jar files. Once you get the POI HWPF binary (zip for Windows and tar for UNIX) you should be able to get you standalone java class executable to work. It appears you understand Java packages and how to import them. You will need to edited your code to reflect the import of the POI packages. As an example I have create a small POI/HSSF standalone and the following are the imports I use for POI/HSSF. The imports for POI/HWPF should be similar. HTH, David.
>
>import org.apache.poi.poifs.filesystem.POIFSFileSystem;
>import org.apache.poi.hssf.usermodel.HSSFCell;
>import org.apache.poi.hssf.usermodel.HSSFSheet;
>import org.apache.poi.hssf.usermodel.HSSFWorkbook;
>import org.apache.poi.hssf.usermodel.HSSFRow;
>
>Georgios Samaritakis wrote ..
>  
>
>>Hello all
>>
>>I've just downloaded POI 2.5.1. I want an API to work with Word files so
>>the next step would be to download HWPF. Well I'm not sure what to do next.
>> I'm supposed to get some files from a CVS or something and then build
>>a 
>>new POI jar file??? It all sounds Greek to me ;)... Anyway could someone
>>explain to me in plain English how to make HWPF work for me?
>>
>>P.S. I would like to be able to write a program like tha following that
>>works (tried using textmining...):
>>
>>import java.lang.*;
>>import java.io.*;
>>
>>class hello {
>>    public static void main(String[] args) {
>>    FileInputStream in = new FileInputStream ("test.doc");
>>WordExtractor extractor = new WordExtractor();
>>
>>String str = extractor.extractText();
>>        System.out.println(str); //Display the string.
>>    }
>>}
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>>Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
>>The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
>The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/
>
>  
>
David thanks for your response. The problem is that I cannot locate the 
"POI HWPF binary (zip for Windows and tar for UNIX)". HWPF is in alpha 
stage and you have to get the files one by one! Has anyone else done 
that before? Has anyone created a working HWPF library?

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/


Re: Downloaded POI-Trying to integrate HWPF

Posted by "David W. Brown" <dw...@webitplanet.com>.
Hello Georgios, I have not worked with the HWPF but I do have some experience with POI/HSSF. I not a POI expert but I am a Java expert. I found the going with POI a lot easier if you just opt for the POI binary download as opposed the building from the POI source and creating your own jar files. Once you get the POI HWPF binary (zip for Windows and tar for UNIX) you should be able to get you standalone java class executable to work. It appears you understand Java packages and how to import them. You will need to edited your code to reflect the import of the POI packages. As an example I have create a small POI/HSSF standalone and the following are the imports I use for POI/HSSF. The imports for POI/HWPF should be similar. HTH, David.

import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.hssf.usermodel.HSSFRow;

Georgios Samaritakis wrote ..
> Hello all
> 
> I've just downloaded POI 2.5.1. I want an API to work with Word files so
> the next step would be to download HWPF. Well I'm not sure what to do next.
>  I'm supposed to get some files from a CVS or something and then build
> a 
> new POI jar file??? It all sounds Greek to me ;)... Anyway could someone
> explain to me in plain English how to make HWPF work for me?
> 
> P.S. I would like to be able to write a program like tha following that
> works (tried using textmining...):
> 
> import java.lang.*;
> import java.io.*;
> 
> class hello {
>     public static void main(String[] args) {
>     FileInputStream in = new FileInputStream ("test.doc");
> WordExtractor extractor = new WordExtractor();
> 
> String str = extractor.extractText();
>         System.out.println(str); //Display the string.
>     }
> }
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
> The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/