Results 1 to 2 of 2
  1. #1
    ironicending is offline Member
    Join Date
    Jan 2009
    Posts
    2
    Rep Power
    0

    Default JXL Empty cell problem

    Hello, i recently posted about a problem calling an excel document but was able to figure it out with a friend, Now my problem is being able to tell a for statement to stop going down a column of cells once it reaches the end of the contents,(or an empty cell). I've tried using these codes.

    for(int i = 0; sheet.getCell(0,i).getContents() != ""; i++)
    for(int i = 0; sheet.getCell(0,i).getContents() != null; i++)
    for(int i = 0; sheet.getCell(0,i).getType()!= CellType.EMPTY; i++)
    for(int i = 0; sheet.getCell(0,i).getCellFormat()!= null; i++)

    Each of these codes have given an out of bounds exception

    any ideas on What i might try next?

  2. #2
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Location
    Cambridge, UK
    Posts
    838
    Rep Power
    13

Similar Threads

  1. KeyBindings Empty Key?
    By Unome in forum Java Applets
    Replies: 1
    Last Post: 10-24-2008, 07:28 PM
  2. Empty ResultSet
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-09-2008, 08:36 PM
  3. Deleting an empty directory
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-13-2008, 07:17 AM
  4. Not Empty check of texboxes using javascript
    By Anju Jose in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 01-09-2008, 12:04 PM
  5. BufferedReader empty
    By Peter in forum Advanced Java
    Replies: 2
    Last Post: 07-02-2007, 06:52 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
  •