Results 1 to 5 of 5
  1. #1
    UJJAL DHAR is offline Senior Member
    Join Date
    Apr 2010
    Location
    Dhaka,Bangladesh
    Posts
    180
    Rep Power
    0

    Default Reading a .doc file

    I am begineer of java.I am facing problem reading a document file..I have a code.when I compile it I get 9 errors.Please let me know about the basic jobs to read a document in JAVA...

    ERRORS are given below..


    package org.apache.poi.poifs.filesystem does not exist
    import org.apache.poi.poifs.filesystem.*;

    package org.apache.poi.hwpf does not exist
    import org.apache.poi.hwpf.*;

    package org.apache.poi.hwpf.extractor does not exist
    import org.apache.poi.hwpf.extractor.*;

    cannot find symbol
    symbol : class POIFSFileSystem
    location: class readDoc
    POIFSFileSystem fs = null;

    cannot find symbol
    symbol : class POIFSFileSystem
    location: class readDoc
    fs = new POIFSFileSystem(new FileInputStream(filesname));

    cannot find symbol
    symbol : class HWPFDocument
    location: class readDoc
    HWPFDocument doc = new HWPFDocument(fs);

    cannot find symbol
    symbol : class HWPFDocument
    location: class readDoc
    HWPFDocument doc = new HWPFDocument(fs);

    cannot find symbol
    symbol : class WordExtractor
    location: class readDoc
    WordExtractor we = new WordExtractor(doc);

    cannot find symbol
    symbol : class WordExtractor
    location: class readDoc
    WordExtractor we = new WordExtractor(doc);

    9 errors

  2. #2
    ksemeks is offline Member
    Join Date
    Jan 2010
    Posts
    6
    Rep Power
    0

    Default

    Well, it seems you didn't download or put the package in the right place.

  3. #3
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Lightbulb

    Quote Originally Posted by UJJAL DHAR View Post
    I am begineer of java.I am facing problem reading a document file..I have a code.when I compile it I get 9 errors.Please let me know about the basic jobs to read a document in JAVA...

    ERRORS are given below..


    package org.apache.poi.poifs.filesystem does not exist
    import org.apache.poi.poifs.filesystem.*;

    package org.apache.poi.hwpf does not exist
    import org.apache.poi.hwpf.*;

    package org.apache.poi.hwpf.extractor does not exist
    import org.apache.poi.hwpf.extractor.*;

    ...
    9 errors
    do you have Apache POI lib installed?
    I recommend first visit latest Apache POI - download it
    then unzip to a folder and add to your project (with IDE)
    If my answer helped you. Please click my "REP" button and add a comment
    Have a Good Java Coding :)

  4. #4
    UJJAL DHAR is offline Senior Member
    Join Date
    Apr 2010
    Location
    Dhaka,Bangladesh
    Posts
    180
    Rep Power
    0

    Default

    If you don't mind,I am downloading the POI.After installing it,what will be my job?
    How I will run this code?
    Let me know the use of IDE.
    Can't I run this code on Command prompt?
    Please tell me about the process...
    What should I do...

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Did you go through the POI documentation. It's explain what you've to do more clearly.

    Please don't post the same message several times. It's really discourage people to answering.

Similar Threads

  1. Replies: 9
    Last Post: 10-20-2009, 11:52 AM
  2. Replies: 3
    Last Post: 05-10-2009, 12:31 AM
  3. Reading XML from file
    By chriscant in forum New To Java
    Replies: 0
    Last Post: 03-17-2009, 02:34 PM
  4. Reading a doc file
    By thehero in forum Advanced Java
    Replies: 0
    Last Post: 03-15-2009, 07:48 AM
  5. Reading from file
    By kiab3000 in forum New To Java
    Replies: 0
    Last Post: 03-14-2009, 07:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •