https://issues.apache.org/bugzilla/show_bug.cgi?id=50277

           Summary: A more convenient API for accessing column information
           Product: POI
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: HSSF
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Currently the Sheet interface has a number of methods for accessing row
information, in particular:

    org.apache.poi.ss.usermodel.Row getRow(int num);
    int getFirstRowNum();
    int getLastRowNum();

A similar API for columns would be useful:

    org.apache.poi.ss.usermodel.Column getColumn(int num);
    int getFirstColummNum();
    int getLastColumnNum();

This Column interface could be a proxy for the ColumnInfoRecord which has the
data about the column, and would mirror the kind of methods the Row interface
has, such as getting the width, hidden flag, styles and so forth.

The primary thing this would permit for us is a more efficient way to iterate
over the columns.  Currently if we want to determine if any columns are hidden,
we need to call isColumnHidden(int) once for each column, which runs the
iterator once for each call.  For a large number of columns this is a
significant performance hit as the operation becomes O(n^2).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to