jxl
Interface Sheet

All Known Subinterfaces:
WritableSheet

public interface Sheet

Represents a sheet within a workbook. Provides a handle to the individual cells, or lines of cells (grouped by Row or Column)


Method Summary
 Cell findCell(java.lang.String contents)
          Gets the cell whose contents match the string passed in.
 LabelCell findLabelCell(java.lang.String contents)
          Gets the cell whose contents match the string passed in.
 Cell getCell(int column, int row)
          Returns the cell specified at this row and at this column.
 Cell[] getColumn(int col)
          Gets all the cells on the specified column
 int getColumns()
          Returns the number of columns in this sheet
 CellView getColumnView(int col)
          Gets the column width for the specified column
 Hyperlink[] getHyperlinks()
          Gets the hyperlinks on this sheet
 Range[] getMergedCells()
          Gets the cells which have been merged on this sheet
 java.lang.String getName()
          Gets the name of this sheet
 Cell[] getRow(int row)
          Gets all the cells on the specified row
 int getRows()
          Returns the number of rows in this sheet
 CellView getRowView(int row)
          Gets the column width for the specified column
 SheetSettings getSettings()
          Gets the settings used on a particular sheet
 

Method Detail

findCell

public Cell findCell(java.lang.String contents)
Gets the cell whose contents match the string passed in. If no match is found, then null is returned. The search is performed on a row by row basis, so the lower the row number, the more efficiently the algorithm will perform

Parameters:
contents - the string to match
Returns:
the Cell whose contents match the paramter, null if not found

findLabelCell

public LabelCell findLabelCell(java.lang.String contents)
Gets the cell whose contents match the string passed in. If no match is found, then null is returned. The search is performed on a row by row basis, so the lower the row number, the more efficiently the algorithm will perform. This method differs from the findCell method in that only cells with labels are queried - all numerical cells are ignored. This should therefore improve performance.

Parameters:
contents - the string to match
Returns:
the Cell whose contents match the paramter, null if not found

getCell

public Cell getCell(int column,
                    int row)
Returns the cell specified at this row and at this column. If a column/row combination forms part of a merged group of cells then (unless it is the first cell of the group) a blank cell will be returned

Parameters:
column - the column number
row - the row number
Returns:
the cell at the specified co-ordinates

getColumn

public Cell[] getColumn(int col)
Gets all the cells on the specified column

Parameters:
col - the column whose cells are to be returned
Returns:
the cells on the specified column

getColumns

public int getColumns()
Returns the number of columns in this sheet

Returns:
the number of columns in this sheet

getColumnView

public CellView getColumnView(int col)
Gets the column width for the specified column

Parameters:
col - the column number
Returns:
the column format, or the default format if no override is specified

getHyperlinks

public Hyperlink[] getHyperlinks()
Gets the hyperlinks on this sheet

Returns:
an array of hyperlinks

getMergedCells

public Range[] getMergedCells()
Gets the cells which have been merged on this sheet

Returns:
an array of range objects

getName

public java.lang.String getName()
Gets the name of this sheet

Returns:
the name of the sheet

getRow

public Cell[] getRow(int row)
Gets all the cells on the specified row

Parameters:
row - the rows whose cells are to be returned
Returns:
the cells on the given row

getRows

public int getRows()
Returns the number of rows in this sheet

Returns:
the number of rows in this sheet

getRowView

public CellView getRowView(int row)
Gets the column width for the specified column

Parameters:
row - the column number
Returns:
the row format, which may be the default format if no format is specified

getSettings

public SheetSettings getSettings()
Gets the settings used on a particular sheet

Returns:
the sheet settings