Results 1 to 3 of 3
  1. #1
    ashvini is offline Member
    Join Date
    Apr 2013
    Posts
    6
    Rep Power
    0

    Default Apace POI XSSF does not support column count, WHY ?

    Hi Team,

    I am new to Java.
    I am writing a program to read XL file (xlsx format).

    I go through the Apache POI API document, I found that I can get row count from XL file.
    However there is no function to get column count from XL, why this is?

    This is strange for me, Apace POI developers should be capable to provide such functionality when they can develop entire lib.
    I have to write from loop/iterate function to get column. Is there any other easy way?
    Please suggest.

    Thanks,
    Ashvini

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

    Default Re: Apace POI XSSF does not support column count, WHY ?

    I suspect (and I would have to read the documentation on the strutcure of an xls or xlsx file to know) that that is simply how Excel structures its data. By row.
    Which means the POI developers have to follow suit.
    I suppose they could provide getColumn equivalents on the sheet which simply finds the maximum getColumn info from each row, but that would be exactly what you;re doing, and simply falls under "nice to have".
    Besides, it's not that difficult to write a utility that gets the highest column number from a sheet. Just a single loop using the row iterator ad a call to the relevant getColumn method.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    ashvini is offline Member
    Join Date
    Apr 2013
    Posts
    6
    Rep Power
    0

    Default Re: Apace POI XSSF does not support column count, WHY ?

    Thanks Tolls.

Similar Threads

  1. Problem getting cell Color (XSSF)
    By sashaxiv in forum Apache POI
    Replies: 9
    Last Post: 02-19-2013, 07:26 PM
  2. Replies: 0
    Last Post: 01-17-2013, 01:43 PM
  3. Replies: 1
    Last Post: 06-29-2012, 10:26 AM
  4. Help with Apace POI in setting underline
    By nn12 in forum New To Java
    Replies: 0
    Last Post: 01-22-2011, 07:58 AM
  5. Replies: 1
    Last Post: 07-06-2010, 05: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
  •