Results 1 to 2 of 2

Thread: "Colspan" cell

  1. #1
    hussan is offline Member
    Join Date
    Jun 2014
    Posts
    2
    Rep Power
    0

    Default "Colspan" cell

    Hi,

    i have this code:
    Java Code:
    XSSFRow row = this.sheet.getRow(1);
    for (Cell cell : row) {
    // cell get colspan(number columns used)
    }
    my cell is colspaned, it is used(4 columns). How i can get the colspan columns of my cell ?

    thanks

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,001
    Rep Power
    20

    Default Re: "Colspan" cell

    A colspan is a mergedRegion (IIRC) in POI.
    You can get a count of them via a sheet and get each one using an index.
    That gives you a CellRangeAddress, which you can pass a row/col coordinates to find out if a particular cell is in that region.

    This is mostly from memory, so you may want to double check the docs.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 0
    Last Post: 12-07-2012, 08:29 AM
  2. Replies: 3
    Last Post: 10-30-2012, 03:06 PM
  3. Replies: 1
    Last Post: 02-01-2012, 08:37 PM
  4. Replies: 2
    Last Post: 01-24-2009, 06:56 PM
  5. Replies: 1
    Last Post: 10-20-2008, 07:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •