|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for a worksheet that may be modified. The most important modification for a sheet is to have cells added to it
Method Summary | |
void |
addCell(WritableCell cell)
Adds a cell to this sheet The RowsExceededException may be caught if client code wishes to explicitly trap the case where too many rows have been written to the current sheet. |
void |
addHyperlink(WritableHyperlink h)
Adds the specified hyperlink. |
void |
addRowPageBreak(int row)
Forces a page break at the specified row |
WritableCell |
getWritableCell(int column,
int row)
Gets the writable cell from this sheet. |
WritableHyperlink[] |
getWritableHyperlinks()
Gets the writable hyperlinks from this sheet. |
void |
insertColumn(int col)
Inserts a blank column into this spreadsheet. |
void |
insertRow(int row)
Inserts a blank row into this spreadsheet. |
Range |
mergeCells(int col1,
int row1,
int col2,
int row2)
Merges the specified cells. |
void |
removeColumn(int col)
Removes a column from this spreadsheet. |
void |
removeHyperlink(WritableHyperlink h)
Removes the specified hyperlink. |
void |
removeHyperlink(WritableHyperlink h,
boolean preserveLabel)
Removes the specified hyperlink. |
void |
removeRow(int row)
Removes a row from this spreadsheet. |
void |
setColumnView(int col,
CellView view)
Sets the view for this column |
void |
setColumnView(int col,
int width)
Sets the width of the column on this sheet, in characters. |
void |
setColumnView(int col,
int width,
CellFormat format)
Deprecated. Use the CellView bean instead |
void |
setFooter(java.lang.String l,
java.lang.String c,
java.lang.String r)
Sets the footer for this page |
void |
setHeader(java.lang.String l,
java.lang.String c,
java.lang.String r)
Sets the header for this page |
void |
setHidden(boolean hidden)
Deprecated. use the SheetSettings bean instead |
void |
setName(java.lang.String name)
Sets the name of this sheet |
void |
setPageSetup(PageOrientation p)
Sets the page setup details |
void |
setPageSetup(PageOrientation p,
double hm,
double fm)
Sets the page setup details |
void |
setPageSetup(PageOrientation p,
PaperSize ps,
double hm,
double fm)
Sets the page setup details |
void |
setProtected(boolean prot)
Deprecated. use the SheetSettings bean instead |
void |
setRowView(int row,
boolean collapsed)
Sets the properties of the specified row |
void |
setRowView(int row,
int height)
Sets the height of the specified row, as well as its collapse status |
void |
setRowView(int row,
int height,
boolean collapsed)
Sets the height of the specified row, as well as its collapse status |
void |
unmergeCells(Range r)
Unmerges the specified cells. |
Methods inherited from interface jxl.Sheet |
findCell, findLabelCell, getCell, getColumn, getColumnFormat, getColumns, getColumnView, getColumnWidth, getHyperlinks, getMergedCells, getName, getRow, getRowHeight, getRows, getRowView, getSettings, isHidden, isProtected |
Method Detail |
public void addCell(WritableCell cell) throws WriteException, RowsExceededException
cell
- jxl.write..WriteException
- RowsExceededException
- public void setName(java.lang.String name)
name
- public void setHidden(boolean hidden)
hidden
- hidden flagpublic void setProtected(boolean prot)
prot
- Protected flagpublic void setColumnView(int col, int width)
col
- the column to be formattedwidth
- the width of the columnpublic void setColumnView(int col, int width, CellFormat format)
col
- the column to be formattedformat
- the format of every cell in the columnwidth
- the width of the column, in characterspublic void setColumnView(int col, CellView view)
col
- the column on which to set the viewview
- the view to setpublic void setRowView(int row, int height) throws RowsExceededException
row
- the row to be formattedheight
- the row height in charactersRowsExceededException
- public void setRowView(int row, boolean collapsed) throws RowsExceededException
row
- the row to be formattedcollapsed
- indicates whether the row is collapsedRowsExceededException
- public void setRowView(int row, int height, boolean collapsed) throws RowsExceededException
row
- the row to be formattedheight
- the row height in characterscollapsed
- indicates whether the row is collapsedRowsExceededException
- public WritableCell getWritableCell(int column, int row)
column
- row
- public WritableHyperlink[] getWritableHyperlinks()
public void insertRow(int row)
row
- the row to insertpublic void insertColumn(int col)
col
- the column to insertpublic void removeColumn(int col)
col
- the column to removepublic void removeRow(int row)
row
- the row to removepublic Range mergeCells(int col1, int row1, int col2, int row2) throws WriteException, RowsExceededException
col1
- the column number of the top left cellrow1
- the row number of the top left cellcol2
- the column number of the bottom right cellrow2
- the row number of the bottom right celljxl.write..WriteException
- RowsExceededException
- public void unmergeCells(Range r)
r
- the range of cells to unmergepublic void addHyperlink(WritableHyperlink h) throws WriteException, RowsExceededException
the
- hyperlinkjxl.write..WriteException
- RowsExceededException
- public void removeHyperlink(WritableHyperlink h)
h
- the hyperlink to remove.preserveLabel
- if TRUE preserves the label contents, if FALSE
removes thempublic void removeHyperlink(WritableHyperlink h, boolean preserveLabel)
h
- the hyperlink to remove.preserveLabel
- if TRUE preserves the label contents, if FALSE
removes thempublic void setHeader(java.lang.String l, java.lang.String c, java.lang.String r)
l
- the print header to print on the left sidec
- the print header to print in the centrer
- the print header to print on the right hand sidepublic void setFooter(java.lang.String l, java.lang.String c, java.lang.String r)
l
- the print header to print on the left sidec
- the print header to print in the centrer
- the print header to print on the right hand sidepublic void setPageSetup(PageOrientation p)
p
- the page orientationpublic void setPageSetup(PageOrientation p, double hm, double fm)
p
- the page orientationhm
- the header margin, in inchesfm
- the footer margin, in inchespublic void setPageSetup(PageOrientation p, PaperSize ps, double hm, double fm)
p
- the page orientationps
- the paper sizehm
- the header margin, in inchesfm
- the footer margin, in inchespublic void addRowPageBreak(int row)
row
- the row to break at
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |