Results 1 to 5 of 5
  1. #1
    nkk
    nkk is offline Member
    Join Date
    Sep 2010
    Posts
    2
    Rep Power
    0

    Default Totally lost with reading excel

    I have been given the task to write a program that does some basic math and numerical integration on numbers. Those numbers are stored in a .xls file. I have looked online and have seen the Apache POI and whatnot, but I have some serious problems stemming from my total lack of knowledge:

    How would I install the binaries at Apache POI - Download Release Artifacts ? I am running Ubuntu 10.04.

    After installation, do I just use import and package to use them in the program? What exactly do I say? I only need HSSF. I use Eclipse, but may dabble in Netbeans, if that makes any difference.

    Once I actually implement them, what if I need to package my program and use it on multiple computers? Would that be easy? I have no idea how to package a program for use (I know I have to make a .jar, but that is it), but that is a bridge to cross later. What I need to know is if it will be easy to use this API on other machines. Will the parts I import be packaged in the jar? Will the other computer (not the one used to develop the program) need to install the Apache POI?

    As you can see, I am totally new at this. I am good at actually coding and the logical part of the process, but I am totally lost when it comes to actually doing anything with my code other than running it within my IDE. Any help would be appreciated.

    Thanks
    Nkk

    PS I put this in the beginners section becuase I am a beginner. If this is more of an advanced topic (then I am in way over my head :) ), then my apologies.

  2. #2
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

  3. #3
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default

    hello nkk, apache poi is delivered with jar-files and not executables. so there are only the same package for any plattform. once you have downloaded the latest stable version of apache poi extract all files and make sure the poi-version-date.jar is either in your classpath or import it in your eclipse classpath by right click your project -> Build Path -> Configure Build Path... chose tab Libraries, click Add External JARs and the select the mentioned poi-version-date.jar file.

    looking in the doc folder you will find a index-file with links to examples. if you are totally new to all then it wouldn't hurt if you follow the links of al_Marshy_1981 first. good luck.

  4. #4
    nkk
    nkk is offline Member
    Join Date
    Sep 2010
    Posts
    2
    Rep Power
    0

    Default

    Thank you both. j2me64, that was exactly the type of answer I was looking for. I just have one more simple question: once I put it into my classpath, it will automatically be packaged when I use eclipse to make a jar, right? So that my jar is totally self contained on other machines.

    al_Marshy_1981, thanks for those links. Although not what I was looking for right now, they are what I need to actually understand what on Earth I am doing.

    Thanks,
    Nkk

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    Nope.
    Your jar will be just your code. You will need to supply the dependent jars as well for it to work on another machine. This is usually done (and I can't remember on Eclipse) with something like a distribution directory, containing your jar file and a lib which contains your dependencies (which the jar references). I know Netbeans does this for you, and I seem to remember Eclipse doing that as well (or similar).

Similar Threads

  1. I'm lost, totally(pointer exceptions?)
    By helpisontheway in forum New To Java
    Replies: 4
    Last Post: 12-01-2009, 07:41 AM
  2. Replies: 5
    Last Post: 08-21-2009, 12:03 PM
  3. reading Excel Files
    By wdb07159 in forum New To Java
    Replies: 2
    Last Post: 05-06-2009, 01:45 PM
  4. reading in 2 sentence for java, I am lost ...
    By madatlis in forum New To Java
    Replies: 16
    Last Post: 10-10-2008, 01:21 PM
  5. Replies: 1
    Last Post: 09-04-2008, 10:07 AM

Posting Permissions

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