Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
public interface Sheet
Method Summary | |
Cell |
|
LabelCell |
|
Cell |
|
Cell |
|
Cell[] |
|
CellFormat |
|
int[] |
|
CellView |
|
int |
|
int |
|
Image |
|
Hyperlink[] |
|
Range[] |
|
String |
|
int |
|
Cell[] |
|
int |
|
int[] |
|
CellView |
|
int |
|
SheetSettings |
|
boolean |
|
boolean |
|
public Cell findCell(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
public LabelCell findLabelCell(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
public Cell getCell(String loc)
Returns the cell for the specified location eg. "A4". Note that this method is identical to calling getCell(CellReferenceHelper.getColumn(loc), CellReferenceHelper.getRow(loc)) and its implicit performance overhead for string parsing. As such,this method should therefore be used sparingly
- Parameters:
loc
- the cell reference
- Returns:
- the cell at the specified co-ordinates
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 numberrow
- the row number
- Returns:
- the cell at the specified co-ordinates
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
public CellFormat getColumnFormat(int col)
Deprecated. Use getColumnView and the CellView bean instead
Gets the column format for the specified column
- Parameters:
col
- the column number
- Returns:
- the column format, or NULL if the column has no specific format
public int[] getColumnPageBreaks()
Accessor for the page breaks on this sheet
- Returns:
- the page breaks on this sheet
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
public int getColumnWidth(int col)
Deprecated. Use getColumnView instead
Gets the column width for the specified column
- Parameters:
col
- the column number
- Returns:
- the column width, or the default width if the column has no specified format
public int getColumns()
Returns the number of columns in this sheet
- Returns:
- the number of columns in this sheet
public Image getDrawing(int i)
Accessor for the image
- Parameters:
i
- the 0 based image number
- Returns:
- the image at the specified position
public Hyperlink[] getHyperlinks()
Gets the hyperlinks on this sheet
- Returns:
- an array of hyperlinks
public Range[] getMergedCells()
Gets the cells which have been merged on this sheet
- Returns:
- an array of range objects
public String getName()
Gets the name of this sheet
- Returns:
- the name of the sheet
public int getNumberOfImages()
Accessor for the number of images on the sheet
- Returns:
- the number of images on this sheet
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
public int getRowHeight(int row)
Deprecated. use getRowView instead
Gets the row height for the specified column
- Parameters:
row
- the row number
- Returns:
- the row height, or the default height if the column has no specified format
public int[] getRowPageBreaks()
Accessor for the page breaks on this sheet
- Returns:
- the page breaks on this sheet
public CellView getRowView(int row)
Gets the row height for the specified column
- Parameters:
row
- the row number
- Returns:
- the row format, which may be the default format if no format is specified
public int getRows()
Returns the number of rows in this sheet
- Returns:
- the number of rows in this sheet
public SheetSettings getSettings()
Gets the settings used on a particular sheet
- Returns:
- the sheet settings
public boolean isHidden()
Deprecated. in favour of the getSettings() method
Determines whether the sheet is hidden
- Returns:
- whether or not the sheet is hidden
public boolean isProtected()
Deprecated. in favour of the getSettings() method
Determines whether the sheet is protected
- Returns:
- whether or not the sheet is protected