Results 1 to 2 of 2
  1. #1
    bayan is offline Member
    Join Date
    Apr 2010
    Rep Power

    Default Kinda Solved: Problems with jxl api(CSharpJExcel)

    I have a problem with this excel api. I can open the workbook fine, open access a specific sheet fine, but when it comes to accessing a certain cell in the sheet.

    Spreadsheets created with excel cannot be accessed while sheets created with Microsoft Works can be accessed fine. I thought it had something to do with not having an excel license, but i got one and still i get the same undefined error.

    It has nothing to do with language compatibility because i could access the sheet by name with Arabic letters. The problems kicked in when I tried to read the cell. Could anyone help me? Help is much appreciated.

    API home: JExcelApi

    Ill post the code perhaps it helps.

    Java Code:
    //All classes are properly imported
     public GasWaterRecordsProcessor(File file){
            // Import workbook
            workbook = Workbook.getWorkbook(file);
           }catch(Exception e){
                    javax.swing.JOptionPane.showMessageDialog(null,"Unable to open file");
            // Get desired sheet for import
            Sheet sheet = workbook.getSheet("كشف");
            //Count the number of current records which exist in the chosen spreadsheet. Here is where the exception occurs
            int cnt = 0;
            while(!sheet.getCell(1, cnt).getContents().equals(null)){
                cnt ++;
            catch(Exception e){javax.swing.JOptionPane.showMessageDialog(null, "Your Microsoft Excel license is inactive \n" +
                            "Possible solutions: \n" +
                            "1. Activate your ms excel license \n"
                           +"2. Use microsoft works spreadsheet as your default spreadsheet program or language compatibility).\n" +
                           "\n If this is not the case then please make sure the spreadsheet is the Excel 97-2003 format. A free converter is available at the microsoft website."+
                           "If it is not then please convert it to the correct format.\n"+"If you still have this broblem please contact your vendor at: 71832630");}
    Left out the rest of the class.
    Last edited by bayan; 08-10-2010 at 09:05 PM.

  2. #2
    bayan is offline Member
    Join Date
    Apr 2010
    Rep Power


    Problem found, but still unresolved. This is an Arabic spreadsheet with cell A starting at the right. This api does not recognise the right to left cell orientation

Similar Threads

  1. JAR problems
    By Evil Smurf in forum New To Java
    Replies: 4
    Last Post: 09-01-2009, 01:17 AM
  2. Problems, problems, problems!
    By Empower5315 in forum New To Java
    Replies: 2
    Last Post: 08-28-2009, 04:27 AM
  3. Few Problems Help!
    By elad_bj in forum New To Java
    Replies: 4
    Last Post: 04-07-2009, 03:45 AM
  4. having problems
    By pinkdiamondgail in forum New To Java
    Replies: 6
    Last Post: 02-06-2009, 11:35 PM
  5. Problems with the jar
    By Freddie in forum NetBeans
    Replies: 2
    Last Post: 05-29-2007, 03:50 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