Help:NoSuchMethodError thrown when reading excel sheet  using jxl API

I'm trying to read data from an Excel-2003 sheet using this code:
15. File file = new File("EmpDetails.xls");
16. jxl.Workbook workbook = jxl.Workbook.getWorkbook(file);                              
17. jxl.Sheet sheet = workbook.getSheet(0);
18. jxl.Cell cell1 = sheet.getCell(0,0);I'm getting this java.lang.NoSuchMethodError: common.Assert.verify(Z)V. The StackTrace is given below:
Exception in thread "main" java.lang.NoSuchMethodError: common.Assert.verify(Z)V
     at jxl.read.biff.SSTRecord.getString(SSTRecord.java:417)
     at jxl.read.biff.LabelSSTRecord.<init>(LabelSSTRecord.java:56)
     at jxl.read.biff.SheetReader.read(SheetReader.java:306)
     at jxl.read.biff.SheetImpl.readSheet(SheetImpl.java:611)
     at jxl.read.biff.WorkbookParser.getSheet(WorkbookParser.java:204)
     at com.scjp.IO.ExcelJXL.main(ExcelJXL.java:17)Please help.

Thanks a lot for the reply.
I had both jxl.jar and xlrd.jar in the classpath and xlrd.jar was loaded before jxl.jar.
There is a conflicting common.Assert.class file in xlrd.jar and there is no verify method in it.
That was creating the problem. I loaded the jxl.jar file before the xlrd.jar and it is working fine.
Thanks a lot for the help!!! :)

Similar Messages

  • 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

  • How to create autofilter in excel page using jxl api?

    Hi Friends,
    I am using jxl api for excel generation. Its no problem
    but i need to set auto filter options. I am search in this API package but i can't find it.
    Any one know how to create autofilter in excel page using jxl api?.
    Please ..... Its urgent.... ...
    Thanks

    Hi,
    Please mail me on [email protected] if u will find any solutions, i will do the same if i will find any...
    Thank u in advance,

  • Read excel sheet using jexcel

    i use a jexcel to read excel file
    i down a package named : jxl.jar
    this my code :
    public static void readFile() throws BiffException
    Workbook w;
    try {
    w = Workbook.getWorkbook(new File("C:/remon.xsl"));
    Sheet read_sheet=w.getSheet("Sheet1");
    int cols = read_sheet.getColumns();
    int rows = read_sheet.getRows();
    Cell cell = null;
    for (int j= 1; j < rows; j++) {
    for (int i = 1; i < rows; i++) {
    cell = read_sheet.getCell(j, i);
    catch (IOException e) {
    System.out.println("2");
    and this the error :
    Class jxl.read.biff.BiffException not found in try.
    *try {*
    *^*
    plza help
    Edited by: romee on May 13, 2008 2:24 PM

    I want to read the contents of an MS Excel file from
    java, is it possible using JavaBeans-ActiveX bridge or
    by any other java technologies, if possible, how ?Bridge2Java from IBM Alphaworks will do the trick for you.
    You can get it from here:
    http://www.alphaworks.ibm.com/aw.nsf/techs/bridge2java
    Using it, you can do things like the following (taken and abbreviated from the samples provided with the package):
    import Excel.*;
    public class QuickExcel
        public static void main(java.lang.String[] args) {
            Application app;
            Workbooks wbs;
            Workbook wb;
            Worksheet sheet;
            Range rangeA1, rangeA2;
            try
                com.ibm.bridge2java.OleEnvironment.Initialize();
                app = new Application(); // Excel.Application !!! :-)
                app.set_Visible(true);
                wbs = app.get_Workbooks();
                wb = wbs.Add();
                sheet = new Worksheet(wb.get_ActiveSheet());
                rangeA1 = sheet.get_Range("A1");
                String out = new String("This is a test");
                rangeA1.set_Value(out);
                // Wait five seconds
                Thread.sleep(5000);
                // Close the workbook without saving
                wb.Close(new Boolean("false"));
                app.Quit();
            } catch (com.ibm.bridge2java.ComException e)
                System.out.println( "COM Exception:" );
                System.out.println( Long.toHexString((e.getHResult())) );
                System.out.println( e.getMessage() );
            } catch (Exception e)
                System.out.println("message: " + e.getMessage());
            } finally
                app = null;
                com.ibm.bridge2java.OleEnvironment.UnInitialize();
    }

  • Drawing an image in excel sheet using HSSF API

    Hi All,
    Can any one please help me.
    I am facing an issue with excel sheet while drawing image using HSSF API.
    I am doing autofit for all the cells i have added. But the image is stretching along with the expanded cells.
    I want the autofit option to work but the image should not stretch. Image should be the same size as is but the cells must expand.
    Thanks in advance

    Hi Santosh
    You can export the report to PDF
    Else you can manually copy the logo\image to excel sheet.
    Hope it will help.
    Regards
    Kultar

  • Read Excel sheet in KM using API.

    Hi all,
    I kept one Excel sheet (Xsl file) in KM. I want to read that Excel (Xsl) file by using API in NWDS.
    How to read ? Is this possible
    Helpful answer will be appreciate
    Thanks & Regards
    Thillai J

    Hi Thillai
    It is possible to read the files using any of the Java Excel API's ( like POI or JExcel or JDBC-ODBC bridge). It depends on your convenience and requirement as to which one to choose for.
    [POI|http://poi.apache.org/] is seem to be widely used.
    In your case, the sequence of actions will be as follows:
    1. Access the resource and get the content.
    2. Get an InputStream from the content object.
    3. Next, using this InputStream, the data can be read.
    4. Refer to [this|http://www.javabeat.net/articles/41-apache-poi-reading-excel-sheet-using-java-1.html] link as to how read data. (It is assumed that you have successfully retrieved the InputStream in Step 2)
    Hope that helps.
    Thanks
    Deepak

  • Problem while writing data on xls file using jxl API

    Hi,
    I am getting problem while writing data on excel file using jxl api.
    When i write data on file and all handles associated to the file are closed, file size increases but when i open the file nothing is written in it and when file is closed manually from excel window, file size decreased to its original that was before writing data.
    here is code:
              FileOutputStream os = new FileOutputStream(this.dirPath + this.fileName, true);
              WritableWorkbook this.workbook = Workbook.createWorkbook(os);
    after writing data following handler are closed:
    this.os.flush();
                        this.workbook.write();
                        this.workbook.close();
                        this.os.close();
                        this.os = null;
    can any body help me.
    Thanks in advance

    Err, I did help you. I did understand your problem; and I solved it for you. What was missing was that you apparently made no effort to understand what you were being told. Or even consider it. You just argued about it, as though you were the one with the solution, instead of the one whose code didn't work.
    And the other thing that was missing was the part where you said 'thank you' to me for solving your problem. Somewhat more appropriate than biting the hand that fed you, frankly. I do this for nothing, on my own gas, and it's extremely irritating when people keep asking about problems I have already solved for them. I am entitled to discourage that. It's part of making them more efficient actually.
    But it happens often enough that it also makes me think I'm just wasting my time. Probably I am.

  • Conneting the microsoft excel sheet using jdbc

    HI all
    my requirement is to connect to the excel sheet using the jdbc odbc dsn and read the worksheets and get the data.
    i have created the dsn using vb scripting
    so when i click on a button. a dsn is created dynamically and the same dsn is passed as parameter to the system which will call a java program
    the java program will us the dsn to connect to the excel sheet to read the data.
    This is working fine
    the problem is sometimes the following exception is raised.
    java.sql.SQLException: [Microsoft][ODBC Excel Driver] Cannot open database '(unknown)'. It may not be a database that your application recognizes, or the file may be corrupt.
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
    at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at com.zt.ebiz.install.client.ExcelDriver.getConnection(ExcelDriver.java:290)
    at com.zt.ebiz.install.client.ExcelDriver.getHostInfo(ExcelDriver.java:337)
    at com.zt.ebiz.install.client.InstallClient.executeActions(InstallClient.java:188)
    at com.zt.ebiz.install.client.InstallClient.main(InstallClient.java:123)
    For this we are just restarting the system.
    Again it works fine.
    i would like to know the cause of this problem.
    please help me in this
    thanks
    Vijay Sunder

    It may be occured because of connection closing, make it sure to close connections after your transactions completed.

  • How to get the password of a password protected Excel Sheet using java/jxl

    Hi ,
    how to get the password of a password protected Excel Sheet using java / jxl program.
    plz any one help me .
    Ramesh P
    [email protected]

    If they've implemented the password system correctly there probably isn't a way of getting the password at all.

  • Generating Excell Sheet using Reports 9i

    Hello,
    I wanna know how can I do to generate one excell sheet using reports, without
    use the option that4s generate text file using tab. I wanna know if someone have
    example codes, or library4s.
    Thanks,
    Paulo Sergio

    Here are some notes we created from the demo below. This works great for generating true formated excel output in 9i Reports using 9ias Rel2.
    Notes from
    http://otn.oracle.com/products/reports/htdocs/getstart/demonstrations/index.html
    Output to Excel with Oracle9i Report
    1.     Create an Excel template for the report. It should contain generic information such as title, logo and column headers
    2.     Cretae a sample line of data in the spreadsheet
    3.     Save the Excel spreadsheet as a Web page. File | Save As Web Page
    4.     Open the Web page you just created in Reports Builder
    5.     Double-click on Web Source node to display the HTML code for the Excel spreadsheet
    6.     Note how Excel generated HTML and XML code for the spreadsheet you created. Reports Builder also adds its own JSP tags
    7.     Add the Data Source An SQL Query
    8.     Modify the Web Source. Now that youve written the query, you can modify the Web source to tell Reports Builder to display your report in Excel.
    9.     Click on the Web Source icon in the toolbar.
    10.     To force the browser to open MS Excel it is necessary to change the HTTP Content Type to a specific MIME Type:
    application/vnd.ms-excel
         Insert the following line immediately before the <rw:report id=report> tag
              <%@ page contentType=application/vnd.ms-excel %>
         (This is a standard JSP directive to set a MIME Type (Content Type) )
    11.     To respect Excel format, you should delete the blank lines above the <html> tag.
    12.     Now, use Oracle 9i Reports JSP tags to add the data retrieved by your SQL Query to the report.
    13.     Search for the sample line of data you added to your Excel spreadsheet
    14.     Each line is saved as an HTML Table Row tag ( <tr> ).
    15.     Each column is mapped as an HTML Table Data tag ( <td> ).
    16.     Using Reports JSP Tags, add a Reports repeating frame tag to loop around the Data Model group.
    17.     To help, show the Object navigator next to the Web Source Window. All group information is now visible in the Object Navigator
    18.     Enclose the sample line of code in the Web source with the Reports9i JSP repeating tag.
    Use from menu Insert | Repeating Frame at beginning of sample
    Move the closing repeating tag after the </tr> tag.
    Start of the repeating tag would be
    <rw:foreach id=foreach src=>
    Ending of the repeating frame would be
    </rw:foreach>
    19.     In the opening of the repeating tag (<for each>), add the name of the group the tags enclose. JSP custom tags require a unique identifier.
    For example: <rw:foreach id=gEmpNoId src=G_EMPNO>
    20.     Now, map the cells of the Excel spreadsheet to the corresponding field from your data model.
    Select on the data value. From menu select Insert | Field. The source of the tag is the name of the field in the query.
    21.     Repeat the operation for each field of the report. Note: do not forget to specify a unique identifier for each field.
    22.     The code now contains a repeating frame. You have also mapped each cell in the Excel spreadsheet to the corresponding field in the data model
    23.     Save the report as a Reports JSP. You can test the report using the Run Web Layout icon in the toolbar
    24.     The execution of a Web Layout report from Reports Builder creates a temporary HTML file and launches the browser. The browser does not launch Excel because the document is saved as an HTML file. To launch Excel from the browser you need to test it from Reports Server.
    25.     In order to have the report appear inside Excel, you need to execute it with the Reports Server under OC4J. To do this you need to:
    First, start an OC4J instance from Oracle 9iDS see How to Execute Reports Services from Oracle 9iDS on OTN. Then, copy the JSP to a directory. For example: $IDS_HOME/reports/j2ee/reports_ids/web/test
    26.     Enter the URL to execute the jsp. The JSP is executed from an OC4J instance.
    http://reports9iTestServer:8888/reports/test/ListOfEmployees.jsp?userid=scott/tiger@ora901
    27. The browser launches Microsoft Excel and displays the data from your report.

  • How to append in excel sheet using Java

    Can anybody help me out in figuring out as how to append in already existing excel sheet using Java.
    I am able to to write in the existing excel sheet using HSSF but is not able to append the data row wise.
    So plz tell me how to do the same.

    Manisha_7 wrote:
    Thnx for the link......No problem.
    but i alsot wanted to know if apart from using poi there is a way to append the data in excel sheet like using JExcel.Don't know. JExcel is also not apart of Java's core API.

  • Closing an excel sheet using active X%3F

    I am working with report generation toolkit.
    Before generating the report I'm trying to close all the excel sheets using Active X. At times the excel application gets closed without asking for the save or dont save option.
    What change should I do in the code?
    Please find the attached code
    Solved!
    Go to Solution.
    Attachments:
    PRJA1832_Dispose all Excel.vi ‏15 KB

    Hi,
         Thanks for the help.
    The VI is still not consistent at times. It closes without saving even if I'm using display alerts. I'm also getting an error when i keep running the code. And I think the error is because the excel sheet is maximised and I'm running the code. Please find the attached snapshot of the error.
    Regards
    Hridhya
    Attachments:
    Report disable alerts.png ‏51 KB

  • The goal is to synchronize an excel sheet using Microsoft Excel 2010 with Sharepoint 3.0

    The goal is to synchronize an excel sheet using Microsoft Excel 2010 with Sharepoint 3.0. We have already installed an add-in (Excel 2007 Add-in: Synchronizing Tables with SharePoint Lists) that was supposed
    to help the synchronization of excel to Sharepoint, but it did not work. We would like to synchronize information about a calendar from excel to Sharepoint 3.0, so every time a change is made in excel it automatically updates in Sharepoint.

    ootb, changes in excel don't sync with a SharePoint list, the other way around is possible.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • Upload Excel sheet using Data Integrator 6.1?

    hi all ,
    Upload Excel sheet using Data Integrator? and how to create ODBC for the PC and jobserver i am using version 6.1? i am using excel as my one of the data source and tell me how to use different types of data sources in DI . after uploading the xl file if i apply any transform on the excel data i will give error like
    Posted: 25 Sep 2008 04:30
    Post subject: Re: Upload Excel sheet using Data Integrator? 
    I am getting the error like
    3128 292 CON-120302 09-25-08 09:59:40 ODBC call <SQLDriverConnect> for data source <sas> failed: <[Microsoft][ODBC Driver Manager] Data source name not found and no
    3128 292 CON-120302 09-25-08 09:59:40 default driver specified>. Notify Customer Support.
    1512 2992 CON-120302 09-25-08 09:59:41 ODBC call <SQLDriverConnect> for data source <sas> failed: <[Microsoft][ODBC Driver Manager] Data source name not found and no
    1512 2992 CON-120302 09-25-08 09:59:41 default driver specified>. Notify Customer Support.
    Please help me out
    Thank u

    Hi Shonti,
    The DI 11.7 installer can be used to upgrade a DI 6.1 local repository (e.g. the upgrade is supported).  This will migrate all jobs and flows.  They will remain intact, however, this is always a major migration effort and should not be taken lightly.  If you do upgrade, please make sure this is a planned effort with rigorous testing and validation.  You should also ensure that you consult the release notes and [supported platforms documentation|https://websmp110.sap-ag.de/~form/sapnet?_SHORTKEY=01100035870000712240&_SCENARIO=01100035870000000202] for the 11.7 package you intend to install.  The DI 11.7 documentation also contains info about how to install and configure the Excel Adapter, and what functionality it provides.
    Thanks,
    ~Scott

  • How do I get the last COLUMN in an Excel Sheet using Report Generation toolkit in LV7.1?

    I am trying to get the last column in an Excel sheet using the Report Generation toolkit. The function "Excel Get Last Row" does not give last column info. Is there a function that will do this?
    Thanks

    Hello –
    I think the following example program might be helpful to get you started programming your application.
    Get Excel Data from Specified Field.
    Hope this helps!
    SVences
    Applications Engineer
    National Instruments

Maybe you are looking for

  • Call an applications 'user exit' from a PL/SQL procedure

    My question is a technical PL/SQL question related to Oracle Applications. I need to call a standard applications 'user exit' from a stored PL/SQL procedure. Can anyone tell me if this is possible and how to do it? (i.e. I am attempting to call the A

  • Can I sync my scandisk to a desktop folder?

    I'm a total newbie to the forums and to Macs for that matter. Anyhow, I've got a little 256MB flash drive (Scandisk). If possible, I'd like to know if OSx has any function or setting to automatically refresh a folder on my iMac from the contents of m

  • Errors In Automatic payment program

    Hi ,    I am undergoing training in SAP FI CO. I am presently dealing with the               automatic payment program in Accounts Payable. I had errors when I was running the proposal item in the transaction code F110 like this:    1.No payment poss

  • NameNotFoundException in JMS Sender Adapter

    Hi, I am doing JMS to File Scenario. In the JMS Sender Adapter, I am getting the following error. Channel error occurred. Detailed error (if any) : com.sap.aii.adapter.jms.api.connector.ConnectorException: Error looking up connection factoryQueueConn

  • Cannot Compare 2 images in CS4

    It appears I cannot compare 2 images with different file extensions in CS4. I am trying to compare a cr2 and psd image but cannot find how. Need advice.