JExcel api jxl.jar problem

hi,
I just downloaded the Jexcel API from source forge. i added the jxl.jar file to my classpath and wrote a small program. But i am getting the following error.
Read_Excel.java:4: package jxl does not exist
import jxl.*;
^I am running my program through command promt only. and i have added the jar also to folder C:\Program Files\Java\jre1.6.0_04\lib\ext
But still same problem.
Please help.

Opening a new command shell and working from there, would have worked, too, but hey, if you wanted to take the time to reboot, more power to you.

Similar Messages

  • Using jxl.jar in VJ++

    Hello,
    This is the first time i am writting to a forum. I have a problem. Can any one plz help.
    I am using VJ++ to read and write Excel Files. Is there a good API which can help me? After searcing, i found jxl.jar. but when i use it with VJ++, i get the following error.
    java.lang.NoClassDefFoundError
    can u plz help me?
    Here is the code:
    package com.netech.rf.lsr;
    import java.io.File;
    import jxl.write.WriteException;
    import jxl.Workbook;
    import jxl.write.WritableWorkbook;
    import jxl.write.WritableSheet;
    public class testing
         public String writeLSR(String fileName) throws WriteException, Exception
              WritableWorkbook LSRbook = Workbook.createWorkbook(new File(fileName));
              WritableSheet lsr = LSRbook.createSheet("LSR",0);
              //writting and closing the excel sheet
              LSRbook.write();
              LSRbook.close();
              String msg = "successfully written";          
         return msg;
         public static void main(String args[])
              try{                    
                   testing lsrrecord = new testing();
                   String msg = lsrrecord.writeLSR("LSRRECORD.XLS");
                   System.out.println(msg);          
              catch(WriteException e)
                   System.out.println("WriteException: " + e.getMessage());
              catch(Exception ex)
                   System.out.println("Exception: " + ex.getMessage());
    But when try to run, it works fine
    E:\TEST_PROJECTS\ExcelTest1>java com.netech.rf.lsr.testing
    successfully written
    But when i create a executable and run the same program, it gives me error:
    E:\TEST_PROJECTS\ExcelTest1>excelTest1.exe
    java.lang.NoClassDefFoundError
    Here is my classpath:
    E:\TEST_PROJECTS\ExcelTest1>echo %classpath%
    C:\WINNT\DnClasses\jxl.jar;;;.;.;.;.;.;.;.;.;.;C:\WINNT\DnClasses\rmi.zip;C:\WINNT\DnClasses\rt.jar;C:\WINNT\DnClasses\activation.jar;C:\WINNT\DnClasses\jndi.jar;C:\WINNT\DnClasses\mail.jar;C:\WINNT\DnClasses\pop3.jar;C:\WINNT\DnClasses\providerutil.jar;C:\WINNT\DnClasses\ldap.jar;C:\WINNT\DnClasses\classes12.zip;C:\NETECH\RFServer\com.jar
    PLEASE ADVICE

    Crosspost!

  • Installing JExcel API

    Hello Everybody,
    I've posted some messages before about using JExcel API.
    Will, Finally it worked with me, and this is how it��s done; I just thought it will be helpful to be archived
    First: Download Andy Khan��s JExcel API from (Free JExcel API) :
    http://www.andykhan.com/
    Next: extract the zipped file to the C:\ drive (or any other drive)
    e.g. C:\jexcelapi
    Now you need to set the CLASSPATH to have the Jar file
    *(Windows users)* Go to: Control Panel �� System �� Environment Variables
    If you don��t yet have a system variable called CLASSPATH, create a new one and add the following path to it (including the dot and the semicolon)
    .;C:\jexcelapi\jxl.jar
    Then set JAVA_HOME to include your JDK path :
    e.g.     C:\Program Files\Java\jdk1.5.0_01
    Assigning CLASSPATH Using CMD (Dos):
    C:\jexcelapi> set CLASSPATH=.;C:\jexcelapi\jxl.jar
    Now you are done.
    To run the Demo provided with the API
    Type the following lines in the CMD window:
    C:\jexcelapi\src>javac jxl/demo/Demo.java //compile
    C:\jexcelapi\src>java jxl.demo.Demo // run
    Jxl.demo is the package provided; you need to add it to each program you create as the first line of the code
    package jxl.demo; Regards,
    MOE

    The servlet api gets installed with any web server that you install. For example if you are installing Jeeves(Java Web Server) you will find a file called servlet.jar which contains all the servlet classes. The path is ./JavaWebServer2.0/lib/servlet.jar.
    Hope that helps.
    Regards
    Jaydeep

  • Unable to display double values in Excel sheet using JExcel API

    Hi
    I am writing code to generate report in the form of Excel Sheet using JExcel API.
    Everything is going fine but whenever I want to put some double values in a cell it is only showing 2 decimal places. My problem is "I want to show upto five decimal places".
    Any kind of reply might help me lot.
    Thank U.

    If you enable the submit zero option, it still happens? This is a new feature on the display tabl
    #NumericZero Enhancements
    To display a numeric zero in place of an error message, you can enter #NumericZero in any of the three Replacement text fields. When you use the #NumericZero option:
    · Excel formatting for the cell is retained.
    · All calculations with dependency on the cell will compute correctly and will take the value of this cell as zero.
    · This numeric zero is for display only. When you submit, the zero value is NOT submitted back to the data source.
    You cannot set display strings for cells that contain an invalid member or dimension name (metadata error). Metadata errors produce standard descriptive error messages.
    Errors are prioritized in the following order from highest to lowest. The error message for a higher-priority error takes precedence over that for a lower-priority error.
    1. (Highest) Metadata errors
    2. #No access
    3. #Invalid/Meaningless
    4. #No data\Missing

  • Error while running WDJ application using jxl.jar

    Hi Experts,
    I am using jxl.jar in my webdynpro java application in CE7.2. I added jxl.jar in java build path and place the jar file in lib directory of webdynpro DC. It shows error in development configuration perspective while building, then i created another DC of type ExternalLibrary and added jxl.jar in libraries folder, then i right click on that jar and published as archive. Then in Development configuration perspective i added ExternalLibrary project to my webdynpro DC, it doen't shows error while building.
    I deployed successfully, when i run the application, it shows the following error. Is there any fault in adding external jar to mt DC? i can't understand where the problem is?
    Error:
    java.lang.ClassNotFoundException: jxl.Workbook -
    Loader Info -
    ClassLoader name: [com.drl.bomrecipe/bomrecipe] Loader hash code: 30a86ee9 Living status: alive Direct parent loaders: [system:Frame] [interface:webservices] [interface:cross] [interface:security] [interface:transactionext] [library:webservices_lib] [library:opensql] [library:jms] [library:ejb20] [service:p4] [service:ejb] [service:servlet_jsp] [sap.com/tcwdapi] [library:tcblexceptionlib] [library:tcblloggingapi] Resources: E:\usr\sap\CE7\J00\j2ee\cluster\apps\com.drl.bomrecipe\bomrecipe\servlet_jsp\webdynpro\resources\com.drl.bomrecipe\bomrecipe\root\WEB-INF\lib\com.drl.bomrecipe~bomrecipe.jar -
        at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:272)
        at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:241)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:367)
    help me please, thanks in advance
    Regards,
    Pradeep Kumar G

    Hi Pradeep,
    Have you created both compilation and assembly public parts for your Ext Lib, and have you added them both to your Used DC's list?
    Also remember, since you are using an assembly public part, the 'Create Archive' and 'Deploy new archive and run' should not be used!
    Use the DC Build and DC Deploy instead.
    Hope this helps!
    Robin van het Hof

  • How to use JExcel API (excel,csv)

    Hi,
    I have my java application and I want to read an excel file (.xls) using the Jexcel API to convert a part of it into csv format or a xml format (to make after a pdf file with another java library).....
    How can I do it? I need only the first steps!!! I don't know where must I start!!
    Thanks a lot

    to read Excel files using JExcel, look at the docs API first. The code you'll need looks like the following:
    Workbook workbook = Workbook.getWorkbook(new File("D:/tmp/source.xls"));
    import jxl.Cell;
    import jxl.Sheet;
    import jxl.Workbook;
    import jxl.read.biff.BiffException;
    Sheet sheet = workbook.getSheet(3);
              int cols = sheet.getColumns();
              int rows = sheet.getRows();
              Cell cell = null;
                   for (i = 1; i < rows; i++) {
                        for (i = 1; i < rows; i++) {
                          cell = sheet.getCell(j, i);
                          //System.out.println(cell.getContents());
                   }In order to generate PDF after, you can use iText or FOP.
    iText doesn't require XML. It uses simply java objects. (http://www.lowagie.com/iText/)
    If you want to generate XML file first, so use FOP. It requires XML and XSL files to generate PDF. (http://xmlgraphics.apache.org/fop/)
    Personnaly, I used the two tools (iText and FOP). I prefer iText because it simple and can generate complex PDF.
    hth

  • Java and Excel : POI vs JExcel API?

    Hello,
    I am hesitating between using the JExcel API and the Jakarta POI API to manipulate (rather simply) excel files with java.
    Has anyone experimented both? What are the drawbacks and the advantages of both?
    Thanks a lot,
    Laetitia

    Laetitia,
    Hello! I've written a significant app (J2EE, EJB using WebLogic) utilizing first the POI api and then the jexcel API to produce MS excel output financial reports (for online content provider) . The application processed 80K plus lines of subscriber information, calculated monthly subscription delivery charges for 100+ publications, each with custom contracts and wrote the calculated data to 'reporting tables'. Basically a specialized datamart of sorts (I know little about 'true' data marting). App would then generate the ms excel spreadsheet reports, one per publisher, utilizing the excel API. The largest publisher report would be over 10Mb in size, containing some 40K rows of data, 30 columns wide.
    I utilized the POI api first because it looked to be a more substantial product with firmer support, more developers, etc. However I soon became confused on how different modules worked, received slow feedback from the development team, and found the documentation to be horribly out of date and misleading. Additionally, the larger the generated excel file became the less stable the server would be until it would crash with memory problems. I'm not saying that the memory errors were within the POI code, but after I switched to jexcel the server crashing went away (perhaps the jexcel code is more forgiving).
    I then switched to use the jexcel API and was immediately pleased. The documentation was accurate and clearer. The functionality I needed was easy to find and worked first time. When I had problems I posted my questions to the yahoo message board and was immediately helped. As an aside on the message board I'm an old internet hack with message boards and am used to stupid posts (and posters) being immediately 'flamed' and derided by those on the list 'in the know'. I was amazed by all the posts from people asking 'I just downloaded jexcel and need help' who actually got thoughtful and helpful posts, not just rude 'RTFM you @#%$$@%' replies.
    Jexcel API was written by one guy but seems to be supported by several. I'd recommend it strongly - new releases come out continually and it's easy to get answers to questions on how to use it. Plus, and this is a biggy with me, the documentation is accurate and useful.
    Email me for more.
    -wcrighton
    [email protected]

  • Re: [JExcel API] how to insert object into a cell

    Hi all,
    i am using JExcel API for Excel file creation. i want to
    insert object like file in particular cell how can i do it.
    i tried WritableHyperLink but it is only inserting hyper link.
    i want proper object inserted into the specific cell.
    please help me out.
    VenuG.

    I am using jxl api to generate a report. i want the insert->object->create from file excel functionality to be implemented using jxl. Help me

  • Jexcel api

    Hi all,
    If any one has used jexcel api to show a drop down box in excel sheet please share the code... or any help for the same is higly appreciated.
    Thanks in advance.

    Hi all,
    I found the solution to my problem,
    For implementing <option name="x" value="0"> smiliar in html in Excel sheet
    you need to do a work around , something like writing the name in the data validation list and the value in a hidden cell
    and when the drop down is changed to select some name corresponding value will be selected by accessing the hidden cell.
    To export data to excel sheet
    using jexcel and want to show a drop down(i.e. dataValidationList), normally you will find the below code to do so -
    /* Start Code */
    //Create a blank obj with row and col num
    Blank b = new Blank(1,1);
    //Create a array list and put objs which u want as list
    ArrayList arrList = new ArrayList();
    arrList.add("DropDown1");
    arrList.add("DropDown2");
    arrList.add("DropDown3");
    //Create writable cell features obj
    WritableCellFeatures cellFeatures = new WritableCellFeatures();
    //set the array list in writable cell features
    cellFeatures.setDataValidationList(al);
    //set the cell features in the blank class
    b.setCellFeatures(cellFeatures);
    //add this blank class to writable sheet
    sheet.addCell(b);
    //write to workbook
    /* End Code */
    The above code will just create a Data Validation List with default value as blank
    to have default value as selected don't use the blank class to write to cell , use Lable instead
    Below is the code for doing this -
    /* Start of Code */
    cellFeatures = new WritableCellFeatures();
    ArrayList al = new ArrayList();
    al.add("bagpuss");
    al.add("clangers");
    al.add("ivor the engine");
    al.add("noggin the nog");
    cellFeatures.setDataValidationList(al);
    Label checkLabel = new Label(1,63,(String)al.get(1));
    checkLabel.setCellFeatures(cellFeatures);
    s1.addCell(checkLabel);
    // write to workbook
    /* End code */
    above code will create a list(DropDown) with values "bagpuss,clangers,ivor the engine,noggin the nog"
    with selected value as "clangers"

  • Everytime need to add jxl.jar before rebuilding the project

    Hello,
    Everytime I have to add jxl.jar in the workspace before rebuilding the project as its path is lost.
    Is there any way out to resolve this problem??
    Thanks n Regards,
    Mandeep

    hi..   
    If you want to add external jar files ...
    and If your WD components are in DCs then you may simply solve the problem by creating External Library DCs and as usual, create a public part out of it and add to the dependencies of your WD DC.
    Follow the following steps  to create an External library and adding it to your dependent DC
         1)Go to File->New->Developmentcomponent
         2)In Window opened select Mycomponents and click Next
         3)In the Window opened Give Name(for example ExcelLib) for                                                external library    and select Type as External Library
         4)Click on Finish
    The  External Library  created is visible in Navigator perspective but not in WebDynpro Explorer perspective
         5)In the folder libraries of the externallibrary(ExcelLib) you paste the jar  file (jxl.jar).
         6)Right Click on the jarfile that you have added in the libraries folder of the  External Library ,go to Developcomponent -
    >add to public part
    7)In the widow opened give the some name  for puplic part and say ok 
    8)Now Right click on the ExternaleLibrary ,Goto DevelopmentComponent --->build
    After build is completed this External Library Dc can be used by other DC As
    Used WebDynpro Components ..where the jar file features ca be accessed    
    Regards
    Madhavi

  • How to get Jxl.jar file

    Hi,
    Can any one tell me how to get Jxl.jar file.
    Thanks & Regards,
    Laxmi

    Hi,
    [jxl.jar|http://www.java2s.com/Code/JarDownload/jxl.jar.zip]
    or else
    open google, and serach for download jxl.jar
    Regards,
    Srinivas

  • Using jxl.jar in Java Web Dynpro using NWDS 7.0.09

    Hi ,
    I have a requiremnt to read excel file and I am trying to use jxl.jar for the same but I am facing issues which using it as External Library DC.During executing,I am getting NoClassFoundException.Please help .

    Hi
    Only one thing u missed that instead of Publishing as file you have to publish it as archive.
    Further u can check
    1. Publish as archive.for both compilation and assembly.
    2. Each changes require Build of the external library dc also.Build it and then run
    Best Regards
    Satish kumar

  • Error after moved jxl.jar library

    Dear All,
    I've a requirement to import data to db table from excel file. I followed the below link
    https://blogs.oracle.com/prajkumar/entry/importing_data_from_excel_sheet
    I moved all the class and xml files and registered in apss (OAFramework version 12.1.1).
    My page is working fine in local but after deployed to the server i got the following error if i click the go button.
    Error
    oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.classloader.util.AnnotatedNoClassDefFoundError, msg= Missing class: jxl.Workbook Dependent class: xxerp.oracle.apps.xxerp.uploadso.server.SaleOrderUploadAMImpl Loader: oacore.root:0.0.0 Code-Source: /d02/oracle/VIS/apps/apps_st/comn/java/classes/ Configuration: <library> in /d02/oracle/VIS/apps/apps_st/comn/webapps/oacore/ The missing class is not available from any code-source or loader in the system.;
    I added the below in orion-applications.xml
    <library path="/d02/oracle/VIS/apps/apps_st/comn/java/classes/xxerp/libraries/library_so_upload/jxl.jar" />
    Thanks in advance,
    SAN

    Hi all,
    After lot of googling, I found a metalink having solution for this.
    Metalink ID 433241.1
    After followed this doc my prob has been resolved.
    Thanks,
    SAN

  • Using java API (dns_sd.jar) in Windows XP does not discover any service

    Hi,
    I have a bonjour discoverable service running on an Ipad and used the DNSSD.resolve java API to discover the service. I installed bonjour for windows and set the class path to take the dns_sd.jar file. I verified that the dnsResponder service is running... However, I am not able to discover the service. I have the same program running on a Mac and there is able to discover the service all the times. I hope someone has experienced the same problem and have a suggestion/solution to post. Thanks in advance.
    --Beto

    Are you doing any JNI or native calls during start-up? That's my quess.
    If you are, must be calling win2000 functions.

  • ORA-01722: invalid number when updating a CMP bean, SP10 WebLogic_RDBMS.jar problem?

    Hi guys
    We are having a problem with the migration to WLCS 3.2 SP2 / WLS 5.1 SP10.
    We are moving from WLCS 3.2 and WLS SP6. Our CMP beans generate errors when
    the container tries to update them. They deploy without error though.
    See below for the stack trace
    We use the recommended weblogic driver for our Oracle 8.1.7.0 database. WL
    runs on w2k, and Oracle on Solaris 7.
    Extract from set-environment:
    SET DB_CLASSPATH=
    SET PATH=%PATH%;%WEBLOGIC_HOME%\bin\oci815_8;%WLCS_ORACLE_HOME%\bin
    SET
    SQLPATH=C:\WebLogicCommerceServer3.2\db\oracle816;C:\WebLogicCommerceServer3
    .2\db\oracle816\event;
    Extract from weblogic.properties:
    weblogic.jdbc.connectionPool.commercePool=\
    url=jdbc:weblogic:oracle,\
    driver=weblogic.jdbc.oci.Driver,\
    I made a few experiments, and I noticed that generating the CMP classes
    (with EJBC) with the old WebLogic_RDBMS.jar (from WLS SP6) is working fine.
    Here is what I mean : ejbc uses the library
    c:\weblogic\lib\persistence\WebLogic_RDBMS.jar And this library has changed
    with SP10. However since that change and after rebuilding our jars, all CMP
    entity beans fail to update.
    If I just replace that WebLogic_RDBMS.jar with the previous one (from SP6),
    and without changing anything else, our CMP beans work fine. I did not
    change any driver or xml deployment descriptor.
    One of the generated files in the jar (for our bean
    VisibilityPSWebLogic_CMP_RDBMS.class) differs, and that seems to be the
    cause of the problem.
    I jadded that class and here is a difference I notice:
    OLD, ejbc ran with SP6 WebLogic_RDBMS.jar : visibilitybean.targetCompanyId =
    (BigDecimal)resultset.getObject(5);
    NEW, ejbc ran with SP10 WebLogic_RDBMS.jar : visibilitybean.targetCompanyId
    = resultset.getBigDecimal(5, 35);
    Similar differences for the SETbigdecimal.
    Dunno if that will help, but I'm attaching the 2 jar files with explicit
    names.
    Damn that was long, I hope someone will read it... Thanks for any help on
    this, see stack trace attached below
    Nicolas Lejeune
    Stack trace:
    mer. oct. 03 12:16:22 CEST 2001:<I> <EJB JAR deployment
    C:/WebLogicCommerceServer3.2/lib/foundation.jar> Exception in
    non-transactional EJB invoke:
    java.rmi.UnexpectedException: Unexpected exception in
    com.b2boost.visibility.VisibilityBean.getVisibilityId():
    java.sql.SQLException: ORA-01722: invalid number
    at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
    at weblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java:980)
    at
    weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:
    47)
    at
    com.b2boost.visibility.VisibilityPSWebLogic_CMP_RDBMS.update(VisibilityPSWeb
    Logic_CMP_RDBMS.java:446)
    at
    com.b2boost.visibility.VisibilityPSWebLogic_CMP_RDBMS.store(VisibilityPSWebL
    ogic_CMP_RDBMS.java:376)
    at
    weblogic.ejb.internal.EntityEJBContext.store(EntityEJBContext.java:192)
    at
    weblogic.ejb.internal.EntityEJBContext.beforeCompletion(EntityEJBContext.jav
    a:227)
    at
    weblogic.ejb.internal.StatefulEJBObject.postInvokeNoTx(StatefulEJBObject.jav
    a:355)
    at
    weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:865)
    at
    com.b2boost.visibility.VisibilityBeanEOImpl.getVisibilityId(VisibilityBeanEO
    Impl.java:198)
    at
    com.b2boost.visibility.pipeline.LoadFirstVisibilityRequestPC.process(LoadFir
    stVisibilityRequestPC.java:83)
    at
    com.beasys.commerce.foundation.pipeline.PipelineExecutorImpl.process(Pipelin
    eExecutorImpl.java:193)
    at
    com.beasys.commerce.foundation.pipeline.PipelineExecutorImplEOImpl.process(P
    ipelineExecutorImplEOImpl.java:56)
    at
    com.beasys.commerce.foundation.pipeline.PipelineExecutorImplEOImpl_ServiceSt
    ub.process(PipelineExecutorImplEOImpl_ServiceStub.java:154)
    at
    com.beasys.commerce.webflow.PipelineProcessor.callPipeline(PipelineProcessor
    .java:170)
    at
    com.beasys.commerce.webflow.PipelineProcessor.process(PipelineProcessor.java
    :102)
    at
    com.beasys.commerce.webflow.WebflowAdvisor.handleTarget(WebflowAdvisor.java:
    409)
    at
    com.beasys.commerce.webflow.WebflowAdvisor.processTarget(WebflowAdvisor.java
    :156)
    at
    com.b2boost.framework.B2boostPortalDestinationDeterminer.determineDestinatio
    n(B2boostPortalDestinationDeterminer.java:208)
    at
    com.beasys.commerce.foundation.flow.FlowManager.service(FlowManager.java:438
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :120)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:922)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
    l.java:886)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
    Manager.java:269)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:392)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:274)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
    [Visibility_generated_with_SP6_weblogic_rdbms_jar.jar]
    [Visibility_generated_with_SP10_weblogic_rdbms_jar.jar]

    You are using WebLogic jDriver for Oracle which needs exact version of OCI API, that comes with the Oracle client installation. Ensure that you have installed the right Oracle client version. And updated the PATH properly.
    I notice that you have
    bin/oci815_8
    oracle816
    Thsi looks liek the inconsistency in your environment.
    What you need to do is
    1. find oci817_8 and place that in the PATH.
    2. install oracle 817 and use that client and set the ORACLE_HOME environment variable and the PATH properly.
    Try this and see if it helps.
    BTW - WLS 5.1 is EOL

Maybe you are looking for