|
xelem.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Worksheet
Represents the Worksheet element.
Field Summary | |
---|---|
static int |
firstColumn
The left-most limit of the worksheets columns. |
static int |
firstRow
The top row of the worksheet. |
static int |
lastColumn
The right-most limit of the worksheets columns. |
static int |
lastRow
The bottom row of the worksheet. |
Fields inherited from interface nl.fountain.xelem.excel.XLElement |
---|
PREFIX_HTML, PREFIX_O, PREFIX_SS, PREFIX_X, XMLNS, XMLNS_HTML, XMLNS_O, XMLNS_SS, XMLNS_X |
Method Summary | |
---|---|
Cell |
addCell()
Adds a new cell at the current position of the worksheets CellPointer and moves the cellpointer. |
Cell |
addCell(Cell cell)
Adds the given cell at the current position of the worksheets CellPointer and moves the cellpointer. |
Cell |
addCell(double data)
Adds a new cell at the current position of the worksheets CellPointer and moves the cellpointer. |
Cell |
addCell(double data,
String styleID)
Adds a new cell at the current position of the worksheets CellPointer and moves the cellpointer. |
Cell |
addCell(int data)
Adds a new cell at the current position of the worksheets CellPointer and moves the cellpointer. |
Cell |
addCell(int data,
String styleID)
Adds a new cell at the current position of the worksheets CellPointer and moves the cellpointer. |
Cell |
addCell(Object data)
Adds a new cell at the current position of the worksheets CellPointer and moves the cellpointer. |
Cell |
addCell(Object data,
String styleID)
Adds a new cell at the current position of the worksheets CellPointer and moves the cellpointer. |
Cell |
addCellAt(Address address)
Adds a new cell at the given address. |
Cell |
addCellAt(Address address,
Cell cell)
Adds the given cell at the given address. |
Cell |
addCellAt(int rowIndex,
int columnIndex)
Adds a new cell at the given row and column index. |
Cell |
addCellAt(int rowIndex,
int columnIndex,
Cell cell)
Adds the given cell at the given row and column index. |
Cell |
addCellAt(String a1_ref)
Adds a new cell at the address specified by the A1-reference string. |
Cell |
addCellAt(String a1_ref,
Cell cell)
Adds the given cell at the address specified by the A1-reference string. |
Column |
addColumn()
Adds a new Column to this worksheet. |
Column |
addColumn(Column column)
Adds the given column to this worksheet. |
Column |
addColumnAt(int index)
Adds a new Column at the given index to this worksheet. |
Column |
addColumnAt(int index,
Column column)
Adds the given Column at the given index to this worksheet. |
Column |
addColumnAt(String label)
Adds a new Column at the index specified by the given label. |
Column |
addColumnAt(String label,
Column column)
Adds the given Column at the given index specified by the given label. |
NamedRange |
addNamedRange(NamedRange namedRange)
Adds a new NamedRange to this worksheet. |
NamedRange |
addNamedRange(String name,
String refersTo)
Adds a new NamedRange to this worksheet. |
Row |
addRow()
Adds a new Row to this worksheet. |
Row |
addRow(Row row)
Adds the given row to this worksheet. |
Row |
addRowAt(int index)
Adds a new Row at the given index to this worksheet. |
Row |
addRowAt(int index,
Row row)
Adds the given Row at the given index to this worksheet. |
Cell |
getCellAt(Address address)
Gets the cell at the given address. |
Cell |
getCellAt(int rowIndex,
int columnIndex)
Gets the cell at the given coordinates. |
Cell |
getCellAt(String a1_ref)
Gets the cell at address specified by the given string in A1-reference style. |
CellPointer |
getCellPointer()
Gets the cellpointer of this worksheet. |
Column |
getColumnAt(int columnIndex)
Gets the column at the given index. |
Column |
getColumnAt(String label)
Gets the column at the index specified by the given label. |
Collection<Column> |
getColumns()
Gets all the columns of this worksheet in the order of their index. |
String |
getName()
Returns the name of this worksheet. |
Map<String,NamedRange> |
getNamedRanges()
Gets all the NamedRanges that were added to this worksheet. |
String |
getReferenceName()
Returns the name of this worksheet for purposes of reference. |
Row |
getRowAt(int rowIndex)
Gets the row at the given index. |
Collection<Row> |
getRows()
Gets all the rows of this worksheet in the order of their index. |
Table |
getTable()
Gets the table of this worksheet. |
WorksheetOptions |
getWorksheetOptions()
Gets the WorksheetOptions of this worksheet. |
boolean |
hasAutoFilter()
Specifies whether the setAutoFilter -method
was applied on this worksheet. |
boolean |
hasCellAt(Address address)
Specifies whether there is a cell at the given address. |
boolean |
hasCellAt(int rowIndex,
int columnIndex)
Specifies whether there is a cell at the intersection of the given row and column index. |
boolean |
hasCellAt(String a1_ref)
Specifies whether there is a cell at the address specified by the given string in A1-reference style. |
boolean |
hasColumnAt(int columnIndex)
Specifies whether there is a column at the given column index. |
boolean |
hasColumnAt(String label)
Specifies whether there is a column at the index specified by the given label. |
boolean |
hasRowAt(int rowIndex)
Specifies whether there is a row at the given row index. |
boolean |
hasTable()
Indicates whether this worksheet has a table. |
boolean |
hasWorksheetOptions()
Indicates whether WorksheetOptions was added to this worksheet. |
boolean |
isProtected()
Specifies whether protection is applied to this worksheet. |
boolean |
isRightToLeft()
Specifies whether this worksheet is displayed from right to left. |
void |
removeAutoFilter()
Removes the Autofilter on this worksheet. |
Cell |
removeCellAt(Address address)
Removes the cell at the given address. |
Cell |
removeCellAt(int rowIndex,
int columnIndex)
Removes the cell at the given coordinates. |
Cell |
removeCellAt(String a1_ref)
Removes the cell at the address specified by the A1-reference string. |
Column |
removeColumnAt(int columnIndex)
Removes the column at the given index. |
Column |
removeColumnAt(String label)
Removes the column at the index specified by the given label. |
Row |
removeRowAt(int rowIndex)
Removes the row at the given index. |
void |
setAutoFilter(AutoFilter af)
Sets the AutoFilter on this worksheet. |
void |
setAutoFilter(String rcString)
Sets the AutoFilter-option on the specified range. |
void |
setProtected(boolean p)
Sets whether protection will be applied to this worksheet. |
void |
setRightToLeft(boolean r)
Sets whether this worksheet will be displayed from right to left. |
void |
setTable(Table table)
Sets the given table as the table of this worksheet. |
void |
setWorksheetOptions(WorksheetOptions wso)
Sets the given worksheetOptions as the worksheetOptions of this worksheet. |
Methods inherited from interface nl.fountain.xelem.excel.XLElement |
---|
addElementComment, assemble, getElementComments, getNameSpace, getPrefix, getTagName, setAttributes, setChildElement |
Field Detail |
---|
static final int firstColumn
static final int firstRow
static final int lastColumn
static final int lastRow
Method Detail |
---|
String getName()
String getReferenceName()
void setProtected(boolean p)
boolean isProtected()
true
if this worksheet is protectedvoid setRightToLeft(boolean r)
boolean isRightToLeft()
true
if this worksheet is displayed from right to leftNamedRange addNamedRange(String name, String refersTo)
If the workbook has a named range with the same name, the named range on the worksheet level has precedence over the one defined on the workbook level.
The string refersTo
should be in R1C1-reference style i.e.
in the format [worksheet name]!R1C1:R1C1
. You may skip
the worksheet indicator: R1C1:R1C1
will do as well.
name
- The name to apply to the range.refersTo
- A String of R1C1-reference style.
NamedRange addNamedRange(NamedRange namedRange)
If the workbook has a named range with the same name, the named range on the worksheet level has precedence over the one defined on the workbook level.
namedRange
- the NamedRange to be added to this worksheet
Map<String,NamedRange> getNamedRanges()
void setWorksheetOptions(WorksheetOptions wso)
wso
- the worksheetOptions to be set on this worksheetboolean hasWorksheetOptions()
true
if this worksheet has WorksheetOptions.WorksheetOptions getWorksheetOptions()
null
.void setTable(Table table)
table
- the table to be set on this worksheetTable getTable()
null
.boolean hasTable()
CellPointer getCellPointer()
Cell addCell()
CellPointer
and moves the cellpointer.
IndexOutOfBoundsException
- if the position of the cellpointer
is not within the limits of the worksheet.CellPointer.move()
Cell addCell(Cell cell)
CellPointer
and moves the cellpointer.
IndexOutOfBoundsException
- if the position of the cellpointer
is not within the limits of the worksheet.CellPointer.move()
Cell addCell(Object data)
CellPointer
and moves the cellpointer.
Datatype and value of the new cell depend on the passed object.
data
- The data to be displayed in this cell.
IndexOutOfBoundsException
- if the position of the cellpointer
is not within the limits of the worksheet.Cell.setData(Object)
,
CellPointer.move()
Cell addCell(Object data, String styleID)
CellPointer
and moves the cellpointer.
Datatype and value of the new cell depend on the passed object. The new cell will have it's styleID set to the given id.
data
- The data to be displayed in this cell.styleID
- The id of the style to employ on this cell.
IndexOutOfBoundsException
- if the position of the cellpointer
is not within the limits of the worksheet.Cell.setData(Object)
,
Cell.setStyleID(String)
,
CellPointer.move()
Cell addCell(double data)
CellPointer
and moves the cellpointer.
data
- The data to be displayed in this cell.
IndexOutOfBoundsException
- if the position of the cellpointer
is not within the limits of the worksheet.Cell.setData(double)
,
CellPointer.move()
Cell addCell(double data, String styleID)
CellPointer
and moves the cellpointer.
data
- The data to be displayed in this cell.styleID
- The id of the style to employ on this cell.
IndexOutOfBoundsException
- if the position of the cellpointer
is not within the limits of the worksheet.Cell.setData(double)
,
Cell.setStyleID(String)
,
CellPointer.move()
Cell addCell(int data)
CellPointer
and moves the cellpointer.
data
- The data to be displayed in this cell.
IndexOutOfBoundsException
- if the position of the cellpointer
is not within the limits of the worksheet.CellPointer.move()
Cell addCell(int data, String styleID)
CellPointer
and moves the cellpointer.
data
- The data to be displayed in this cell.styleID
- The id of the style to employ on this cell.
IndexOutOfBoundsException
- if the position of the cellpointer
is not within the limits of the worksheet.Cell.setStyleID(String)
,
CellPointer.move()
Cell addCellAt(Address address)
address
.
address
- The address where the new cell should be added.
IndexOutOfBoundsException
- if the address
is not within the limits of the worksheet.CellPointer.move()
Cell addCellAt(int rowIndex, int columnIndex)
rowIndex
and columnIndex
.
rowIndex
- The row index (row number).columnIndex
- The column index (column number).
IndexOutOfBoundsException
- if the position
is not within the limits of the worksheet.CellPointer.move()
Cell addCellAt(String a1_ref)
a1_ref
- a string in A1-reference style
IndexOutOfBoundsException
- if the position
is not within the limits of the worksheet.CellPointer.move()
Cell addCellAt(Address address, Cell cell)
address
.
address
- The address where the cell should be added.cell
- The cell to be added.
IndexOutOfBoundsException
- if the address
is not within the limits of the worksheet.CellPointer.move()
Cell addCellAt(int rowIndex, int columnIndex, Cell cell)
rowIndex
and columnIndex
.
rowIndex
- The row index (row number).columnIndex
- The column index (column number).cell
- The cell to be added.
IndexOutOfBoundsException
- if the position
is not within the limits of the worksheet.CellPointer.move()
Cell addCellAt(String a1_ref, Cell cell)
a1_ref
- a string of A1-reference stylecell
- the cell to be added.
IndexOutOfBoundsException
- if the position
is not within the limits of the worksheet.CellPointer.move()
Cell removeCellAt(Address address)
address
- The position of the cell to remove.
null
.Cell removeCellAt(int rowIndex, int columnIndex)
rowIndex
- The row index (row number).columnIndex
- The column index (column number).
null
.Cell removeCellAt(String a1_ref)
a1_ref
- a string of A1-reference style
null
.Cell getCellAt(Address address)
address
- The position of the cell.
null
Cell getCellAt(int rowIndex, int columnIndex)
rowIndex
- The row index (row number).columnIndex
- The column index (column number).
null
Cell getCellAt(String a1_ref)
a1_ref
- a string of A1-reference style
null
boolean hasCellAt(Address address)
boolean hasCellAt(int rowIndex, int columnIndex)
boolean hasCellAt(String a1_ref)
Row addRow()
maxRowIndex
of the underlying Table + 1.
IndexOutOfBoundsException
- If the calculated index is less then
firstRow
or greater
then lastRow
.Row addRowAt(int index)
index
- The index (row number) of the row.
IndexOutOfBoundsException
- If the given index is less then
firstRow
or greater
then lastRow
.Row addRow(Row row)
maxRowIndex
of the underlying Table + 1.
row
- The row to be added.
IndexOutOfBoundsException
- If the calculated index is less then
firstRow
or greater
then lastRow
.Row addRowAt(int index, Row row)
index
- The index (row number) of the row.row
- The row to be added.
IndexOutOfBoundsException
- If the given index is less then
firstRow
or greater
then lastRow
.Row removeRowAt(int rowIndex)
rowIndex
- The index (row number) of the row.
null
if the index was not occupied
by a row.Collection<Row> getRows()
Row getRowAt(int rowIndex)
rowIndex
- The index (row number) of the row.
null
.
IndexOutOfBoundsException
- If the calculated index is less then
firstRow
or greater
then lastRow
.boolean hasRowAt(int rowIndex)
Column addColumn()
maxColumnIndex
of the underlying Table + 1.
IndexOutOfBoundsException
- If the calculated index is less then
firstColumn
or greater
then lastColumn
.Column addColumnAt(int index)
index
- The index (column number) of the column.
IndexOutOfBoundsException
- If the given index is less then
firstColumn
or greater
then lastColumn
.Column addColumnAt(String label)
label
- a string ("A" through "IV" inclusive)
corresponding to the column index
IndexOutOfBoundsException
- If the given index is less then
firstColumn
or greater
then lastColumn
.Column addColumn(Column column)
maxColumnIndex
of the underlying Table + 1.
column
- The column to be added.
IndexOutOfBoundsException
- If the calculated index is less then
firstColumn
or greater
then lastColumn
.Column addColumnAt(int index, Column column)
index
- The index (column number) of the column.column
- The column to be added.
IndexOutOfBoundsException
- If the given index is less then
firstColumn
or greater
then lastColumn
.Column addColumnAt(String label, Column column)
label
- a string ("A" through "IV" inclusive)
corresponding to the column indexcolumn
- The column to be added.
IndexOutOfBoundsException
- If the given index is less then
firstColumn
or greater
then lastColumn
.Column removeColumnAt(int columnIndex)
columnIndex
- The index (column number) of the column.
null
if the index was not occupied
by a column.Column removeColumnAt(String label)
label
- a string ("A" through "IV" inclusive)
corresponding to the column index
null
if the index was not occupied
by a column.Collection<Column> getColumns()
Column getColumnAt(int columnIndex)
columnIndex
- The index (column number) of the column.
null
.
IndexOutOfBoundsException
- If the given index is less then
firstColumn
or greater
then lastColumn
.Column getColumnAt(String label)
label
- a string ("A" through "IV" inclusive)
corresponding to the column index
null
.
IndexOutOfBoundsException
- If the given index is less then
firstColumn
or greater
then lastColumn
.boolean hasColumnAt(int columnIndex)
boolean hasColumnAt(String label)
label
- a string ("A" through "IV" inclusive)
corresponding to the column indexvoid setAutoFilter(String rcString)
The String rcString
should include all of the
columns that are to be equiped with a drop-down button at their column-
headings, and should either include just the row of the column-headings
or the entire range on which the AutoFilter must be set.
Here are some examples:
Given a table of 3 columns and 11 rows. The column-headings are at row 10.
The table-data expands to row 21.
R10C1:R10C3
- the AutoFilter includes the entire range
(R10C1:R21C3) and will dynamically expand if more rows of data are
added below.
R10C1:R21C3
- the AutoFilter includes the entire range
(R10C1:R21C3) and will dynamically expand if more rows of data are
added below.
R10C1:R10C2
- the AutoFilter includes the entire range
(R10C1:R21C3) and will dynamically expand if more rows of data are
added below, however, only the first two column-headings have drop
-down buttons.
R12C1:R12C3
- drop-down buttons manifest at row 12;
this is probably not what you wanted.
rcString
- A String of R1C1 reference style.void setAutoFilter(AutoFilter af)
af
- the AutoFilter to be set on this worksheet.boolean hasAutoFilter()
setAutoFilter
-method
was applied on this worksheet.
setAutoFilter
-method
was applied on this worksheet, false otherwise.void removeAutoFilter()
|
xelem.3.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |