|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | 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 |
addColumnPageBreak(int col)
Forces a page break at the specified column |
void |
addHyperlink(WritableHyperlink h)
Adds the specified hyperlink. |
void |
addImage(WritableImage image)
Adds an image to the sheet |
void |
addRowPageBreak(int row)
Forces a page break at the specified row |
WritableImage |
getImage(int i)
Accessor for the image |
int |
getNumberOfImages()
Accessor for the number of images on the sheet |
WritableCell |
getWritableCell(int column,
int row)
Gets the writable cell from this sheet. |
WritableCell |
getWritableCell(java.lang.String loc)
Returns the cell for the specified location eg. |
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 |
removeImage(WritableImage wi)
Removes the specified image from the sheet. |
void |
removeRow(int row)
Removes a row from this spreadsheet. |
void |
setColumnGroup(int col1,
int col2,
boolean collapsed)
Sets a column grouping |
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)
Deprecated. use the SheetSettings bean |
void |
setHeader(java.lang.String l,
java.lang.String c,
java.lang.String r)
Deprecated. use the SheetSettings bean |
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 |
setRowGroup(int row1,
int row2,
boolean collapsed)
Sets a row grouping |
void |
setRowView(int row,
boolean collapsed)
Sets the properties of the specified row |
void |
setRowView(int row,
CellView view)
Sets the view for this column |
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. |
void |
unsetColumnGroup(int col1,
int col2)
Unsets a column grouping |
void |
unsetRowGroup(int row1,
int row2)
Unsets a row grouping |
Methods inherited from interface jxl.Sheet |
findCell, findCell, findCell, findLabelCell, getCell, getCell, getColumn, getColumnFormat, getColumnPageBreaks, getColumns, getColumnView, getColumnWidth, getDrawing, getHyperlinks, getMergedCells, getName, getRow, getRowHeight, getRowPageBreaks, getRows, getRowView, getSettings, isHidden, isProtected |
Method Detail |
public void addCell(WritableCell cell) throws WriteException, jxl.write.biff.RowsExceededException
cell
- the cell to add
jxl.write..WriteException
jxl.write.biff.RowsExceededException
WriteException
public void setName(java.lang.String name)
name
- the name of the sheetpublic 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 jxl.write.biff.RowsExceededException
row
- the row to be formattedheight
- the row height in characters
jxl.write.biff.RowsExceededException
public void setRowView(int row, boolean collapsed) throws jxl.write.biff.RowsExceededException
row
- the row to be formattedcollapsed
- indicates whether the row is collapsed
jxl.write.biff.RowsExceededException
public void setRowView(int row, int height, boolean collapsed) throws jxl.write.biff.RowsExceededException
row
- the row to be formattedheight
- the row height in 1/20th of a pointcollapsed
- indicates whether the row is collapsed
jxl.write.biff.RowsExceededException
public void setRowView(int row, CellView view) throws jxl.write.biff.RowsExceededException
row
- the column on which to set the viewview
- the view to set
jxl.write.biff.RowsExceededException
public WritableCell getWritableCell(int column, int row)
column
- the columnrow
- the row
public WritableCell getWritableCell(java.lang.String loc)
loc
- the cell reference
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, jxl.write.biff.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 cell
jxl.write..WriteException
jxl.write.biff.RowsExceededException
WriteException
public void setRowGroup(int row1, int row2, boolean collapsed) throws WriteException, jxl.write.biff.RowsExceededException
row1
- the first row of the grouprow2
- the last row of the groupcollapsed
- should the group be collapsed?
WriteException
jxl.write.biff.RowsExceededException
public void unsetRowGroup(int row1, int row2) throws WriteException, jxl.write.biff.RowsExceededException
row1
- the first row to unsetrow2
- the last row to unset
WriteException
jxl.write.biff.RowsExceededException
public void setColumnGroup(int col1, int col2, boolean collapsed) throws WriteException, jxl.write.biff.RowsExceededException
col1
- the first column of the groupcol2
- the last column of the groupcollapsed
- should the group be collapsed?
WriteException
jxl.write.biff.RowsExceededException
public void unsetColumnGroup(int col1, int col2) throws WriteException, jxl.write.biff.RowsExceededException
col1
- the first column to unsetcol2
- the last column to unset
WriteException
jxl.write.biff.RowsExceededException
public void unmergeCells(Range r)
r
- the range of cells to unmergepublic void addHyperlink(WritableHyperlink h) throws WriteException, jxl.write.biff.RowsExceededException
h
- the hyperlink
jxl.write..WriteException
jxl.write.biff.RowsExceededException
WriteException
public void removeHyperlink(WritableHyperlink h)
h
- the hyperlink to remove.public 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 atpublic void addColumnPageBreak(int col)
col
- the column to break atpublic void addImage(WritableImage image)
image
- the image to addpublic int getNumberOfImages()
getNumberOfImages
in interface Sheet
public WritableImage getImage(int i)
i
- the 0 based image number
public void removeImage(WritableImage wi)
wi
- the image to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |