There was a mistake on my previous mail. This is OK:

import java.io.FileInputStream;
import org.apache.poi.hwpf.usermodel.*;
import org.apache.poi.hwpf.HWPFDocument;
import org.apache.poi.hwpf.*;

public class HWPF {
 public static void main(String[] args) throws Exception{
     HWPFDocument file;
  file = new HWPFDocument(new FileInputStream("c:\\ResumeFormat.doc"));
        Range range = file.getRange();
        String dd = range.text());
        System.out.println(dd);
 }
}

Zahurul
www.zahurul.com
> You are to close. Check this:
>
> import java.io.FileInputStream;
> import org.apache.poi.hwpf.usermodel.*;
> import org.apache.poi.hwpf.HWPFDocument;
> import org.apache.poi.hwpf.*;
>
> public class HWPF {
>  public static void main(String[] args) throws Exception{
>      HWPFDocument file;
>   file = new HWPFDocument(new FileInputStream("c:\\ResumeFormat.doc"));
>         Range range = file.getRange();
>         String dd = file.text());
>         System.out.println(dd);
>  }
> }
>
> Zahurul
> www.zahurul.com
>
>> when i tried this piece of code i am getting this error
>>
>> import java.io.FileInputStream;
>> import org.apache.poi.hwpf.usermodel.*;
>> import org.apache.poi.hwpf.HWPFDocument;
>> import org.apache.poi.hwpf.*;
>>
>> public class HWPF {
>>  public static void main(String[] args) throws Exception{
>>      HWPFDocument file;
>>   file = new HWPFDocument(new FileInputStream("c:\\ResumeFormat.doc"));
>>         String dd = file.getTextTable();
>>         System.out.println(dd);
>>  }
>> }
>>
>>
>> error is
>>
>>  C:\rajuwork>javac HWPF.java
>> HWPF.java:10: incompatible types
>> found   : org.apache.poi.hwpf.model.TextPieceTable
>> required: java.lang.String
>>         String dd = file.getTextTable();
>>                                      ^
>> 1 error
>>
>
>
> ---------------------------------------------------------------------
> 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/
>


---------------------------------------------------------------------
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/

Reply via email to