Modifier and Type | Method and Description |
---|---|
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
|
void |
applySharedDataValidation(WritableCell cell,
int col,
int row)
Extend the data validation contained in the specified cell across and
downwards.
|
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 |
removeSharedDataValidation(WritableCell cell)
Remove the shared data validation from multiple cells.
|
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
|
findCell, findCell, findCell, findLabelCell, getCell, getCell, getColumn, getColumnFormat, getColumnPageBreaks, getColumns, getColumnView, getColumnWidth, getDrawing, getHyperlinks, getMergedCells, getName, getRow, getRowHeight, getRowPageBreaks, getRows, getRowView, getSettings, isHidden, isProtected
void addCell(WritableCell cell) throws WriteException, jxl.write.biff.RowsExceededException
cell
- the cell to addjxl.write..WriteException
jxl.write.biff.RowsExceededException
WriteException
void setName(java.lang.String name)
name
- the name of the sheetvoid setHidden(boolean hidden)
hidden
- hidden flagvoid setProtected(boolean prot)
prot
- Protected flagvoid setColumnView(int col, int width)
col
- the column to be formattedwidth
- the width of the columnvoid 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 charactersvoid setColumnView(int col, CellView view)
col
- the column on which to set the viewview
- the view to setvoid setRowView(int row, int height) throws jxl.write.biff.RowsExceededException
row
- the row to be formattedheight
- the row height in charactersjxl.write.biff.RowsExceededException
void setRowView(int row, boolean collapsed) throws jxl.write.biff.RowsExceededException
row
- the row to be formattedcollapsed
- indicates whether the row is collapsedjxl.write.biff.RowsExceededException
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 collapsedjxl.write.biff.RowsExceededException
void setRowView(int row, CellView view) throws jxl.write.biff.RowsExceededException
row
- the column on which to set the viewview
- the view to setjxl.write.biff.RowsExceededException
WritableCell getWritableCell(int column, int row)
column
- the columnrow
- the rowWritableCell getWritableCell(java.lang.String loc)
loc
- the cell referenceWritableHyperlink[] getWritableHyperlinks()
void insertRow(int row)
row
- the row to insertvoid insertColumn(int col)
col
- the column to insertvoid removeColumn(int col)
col
- the column to removevoid removeRow(int row)
row
- the row to removeRange 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 celljxl.write..WriteException
jxl.write.biff.RowsExceededException
WriteException
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
void unsetRowGroup(int row1, int row2) throws WriteException, jxl.write.biff.RowsExceededException
row1
- the first row to unsetrow2
- the last row to unsetWriteException
jxl.write.biff.RowsExceededException
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
void unsetColumnGroup(int col1, int col2) throws WriteException, jxl.write.biff.RowsExceededException
col1
- the first column to unsetcol2
- the last column to unsetWriteException
jxl.write.biff.RowsExceededException
void unmergeCells(Range r)
r
- the range of cells to unmergevoid addHyperlink(WritableHyperlink h) throws WriteException, jxl.write.biff.RowsExceededException
h
- the hyperlinkjxl.write..WriteException
jxl.write.biff.RowsExceededException
WriteException
void removeHyperlink(WritableHyperlink h)
h
- the hyperlink to remove.void removeHyperlink(WritableHyperlink h, boolean preserveLabel)
h
- the hyperlink to remove.preserveLabel
- if TRUE preserves the label contents, if FALSE
removes themvoid 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 sidevoid 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 sidevoid setPageSetup(PageOrientation p)
p
- the page orientationvoid setPageSetup(PageOrientation p, double hm, double fm)
p
- the page orientationhm
- the header margin, in inchesfm
- the footer margin, in inchesvoid 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 inchesvoid addRowPageBreak(int row)
row
- the row to break atvoid addColumnPageBreak(int col)
col
- the column to break atvoid addImage(WritableImage image)
image
- the image to addint getNumberOfImages()
getNumberOfImages
in interface Sheet
WritableImage getImage(int i)
i
- the 0 based image numbervoid removeImage(WritableImage wi)
wi
- the image to removevoid applySharedDataValidation(WritableCell cell, int col, int row) throws WriteException
col
- the number of cells accross to apply this data validationrow
- the number of cells downwards to apply this data validationWriteException
void removeSharedDataValidation(WritableCell cell) throws WriteException
cell
- the top left cell containing the shared data validationWriteException