Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.ss.usermodel
Interface CellRange

All Superinterfaces:
  Iterable

All Known Implementing Classes:
  SSCellRange

    public interface CellRange

extends Iterable

Represents a rectangular region of a `Sheet`

Author:
  Josh Micich

Method Summary
`java.lang.Object` | `getCell(int relativeRowIndex, int relativeColumnIndex)`
`java.lang.Object[][]` | `getCells()`
`java.lang.Object[]` | `getFlattenedCells()`
`int` | `getHeight()`
`java.lang.String` | `getReferenceText()`
`java.lang.Object` | `getTopLeftCell()`
`int` | `getWidth()`
`java.util.Iterator` | `iterator()`
`int` | `size()` Gets the number of cells in this range.

Method Detail

### getWidth

    int getWidth()

### getHeight

    int getHeight()

### size

    int size()

  Gets the number of cells in this range.

  Returns:
    `height * width`

### getReferenceText

    java.lang.String getReferenceText()

### getTopLeftCell

    java.lang.Object getTopLeftCell()

  Returns:
    the cell at relative coordinates (0,0). Never `null`.

### getCell

    java.lang.Object getCell(int relativeRowIndex,
                             int relativeColumnIndex)

  Parameters:
    `relativeRowIndex` - must be between `0` and `height-1`
    `relativeColumnIndex` - must be between `0` and `width-1`
  Returns:
    the cell at the specified coordinates. Never `null`.

### getFlattenedCells

    java.lang.Object[] getFlattenedCells()

  Returns:
    a flattened array of all the cells in this `CellRange`

### getCells

    java.lang.Object[][] getCells()

  Returns:
    a 2-D array of all the cells in this `CellRange`. The first array dimension is the row index (values `0...height-1`) and the second dimension is the column index (values `0...width-1`)

### iterator

    java.util.Iterator iterator()

  Specified by:
    `iterator` in interface `Iterable`
  Returns:
    an `Iterator` over all cells in this range. Iteration starts with all cells in the first row followed by all cells in the next row, etc.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD