Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: problem importing jexcel in netbeans

  1. #1
    Junior Member
    Join Date
    Jan 2013
    Thanked 0 Times in 0 Posts

    Default problem importing jexcel in netbeans

    Hello JPF,
    I am a new member, and this is my first post so please bear with me. I am trying to import the jxl package into Netbeans so that I can read excel files in java, but I am getting an error.

    Things I have done:
    I have downloaded the jexcel files, which consist of a jxl-core.jar file and a jxl-reader.jar file.

    I have saved these files into the same folder as the package I am trying to use.

    In NetBeans, I went to package>properties>library and added the two jar files to the classpath.

    Finally, I tried to import the package by using "import jxl-reader.*;" and "import jxl-core.*;"

    but I am getting an error that sometimes says "missing '.'" I am assuming this has to do with the file not existing, because a minute ago it was giving me a "package jxl-core does not exist" error.

    I do not know how to use command line, and I also do not know how to use apache or deal with the .xml file.

    Can someone please help? I would really appreciate it, and am willing to learn how to use apache or the command line if necessary.

    thanks in advance,

  2. #2
    Junior Member
    Join Date
    Jun 2012
    Thanked 1 Time in 1 Post

    Default Re: problem importing jexcel in netbeans

    The exact procedure will depend on the version of Netbeans you are using; currently I have both 7.2 and 7.3 beta 2 installed and the procedue for these is generally the same.

    First, I advise against copying the .jar files into any of your project folders - netbeans will handle that for you.

    I keep all of my third party library files in a separate directory c:\javalibs with appropriate subdirectories for all the .jar files.

    Once you have decided where to keep the original .jar you need to use the NB menu Tools | Ant Libraries and click on the button New Library. Give the library a meaningful name such as 'jexcel' and library type is 'class libraries'. Once you have done this, use the Add Jar/Folder button and add the all the relevant .jar files to the classpath tab. Take the time to fill in references to the sources and javadoc while you have the Ant Library Manager window open.

    Once you have completed the library definition, open up the Project Properties dialog and add the library you just created. If when you created the project initially, you elected to store all libraries in a project folder, the procedure is slightly different - you first need to import the library into those available to the project - and then add the library. The first crucial step is to create the library in the first place!!

    Once you have the library referenced in the Project Properties compile-time tab you will be able to import the packages you need.

Similar Threads

  1. NetBeans - Importing an HTML based API Library
    By Khalon in forum Java IDEs
    Replies: 2
    Last Post: April 9th, 2012, 01:04 PM
  2. NetBeans problem
    By Hamed in forum Java IDEs
    Replies: 1
    Last Post: February 10th, 2012, 11:56 PM
  3. what the stupid problem in using netbeans
    By ms_ceng in forum Java IDEs
    Replies: 3
    Last Post: December 13th, 2011, 03:28 AM
  4. importing my application into NetBeans
    By gib65 in forum Java IDEs
    Replies: 3
    Last Post: July 25th, 2011, 01:54 PM
  5. jExcel
    By Tisofa in forum Java SE APIs
    Replies: 0
    Last Post: August 7th, 2009, 03:18 AM

Tags for this Thread