public class ListObject
Example:
Workbook workbook = new Workbook();
Cells cells = workbook.getWorksheets().get(0).getCells();
for (int i = 0; i < 5; i++)
{
cells.get(0, i).putValue(CellsHelper.columnIndexToName(i));
}
for (int row = 1; row < 10; row++)
{
for (int column = 0; column < 5; column++)
{
cells.get(row, column).putValue(row * column);
}
}
ListObjectCollection tables = workbook.getWorksheets().get(0).getListObjects();
int index = tables.add(0, 0, 9, 4, true);
ListObject table = tables.get(0);
table.setShowTotals(true);
table.getListColumns().get(4).setTotalsCalculation(TotalsCalculation.SUM);
Property Getters/Setters Summary | ||
---|---|---|
java.lang.String | getAlternativeDescription() | |
void | setAlternativeDescription(java.lang.Stringvalue) | |
Gets and sets the alternative description. | ||
java.lang.String | getAlternativeText() | |
void | setAlternativeText(java.lang.Stringvalue) | |
Gets and sets the alternative text. | ||
AutoFilter | getAutoFilter() | |
Gets auto filter.
|
||
java.lang.String | getComment() | |
void | setComment(java.lang.Stringvalue) | |
Gets and sets the comment of the table. | ||
Range | getDataRange() | |
Gets the data range of the ListObject.
|
||
int | getDataSourceType() | |
Gets the data source type of the table.
The value of the property is TableDataSourceType integer constant. |
||
java.lang.String | getDisplayName() | |
void | setDisplayName(java.lang.Stringvalue) | |
Gets and sets the display name. | ||
int | getEndColumn() | |
Gets the end column of the range.
|
||
int | getEndRow() | |
Gets the end row of the range.
|
||
ListColumnCollection | getListColumns() | |
Gets ListColumns of the ListObject.
|
||
QueryTable | getQueryTable() | |
Gets the linked QueryTable.
|
||
boolean | getShowHeaderRow() | |
void | setShowHeaderRow(booleanvalue) | |
Gets and sets whether this ListObject show header row. | ||
boolean | getShowTableStyleColumnStripes() | |
void | setShowTableStyleColumnStripes(booleanvalue) | |
Indicates whether column stripe formatting is applied. | ||
boolean | getShowTableStyleFirstColumn() | |
void | setShowTableStyleFirstColumn(booleanvalue) | |
Inidicates whether the first column in the table should have the style applied. | ||
boolean | getShowTableStyleLastColumn() | |
void | setShowTableStyleLastColumn(booleanvalue) | |
Indicates whether the last column in the table should have the style applied. | ||
boolean | getShowTableStyleRowStripes() | |
void | setShowTableStyleRowStripes(booleanvalue) | |
Indicates whether row stripe formatting is applied. | ||
boolean | getShowTotals() | |
void | setShowTotals(booleanvalue) | |
Gets and sets whether this ListObject show total row. | ||
int | getStartColumn() | |
Gets the start column of the range.
|
||
int | getStartRow() | |
Gets the start row of the range.
|
||
java.lang.String | getTableStyleName() | |
void | setTableStyleName(java.lang.Stringvalue) | |
Gets and sets the table style name. | ||
int | getTableStyleType() | |
void | setTableStyleType(intvalue) | |
Gets and the built-in table style. The value of the property is TableStyleType integer constant. | ||
XmlMap | getXmlMap() | |
Gets an |
Method Summary | ||
---|---|---|
void | applyStyleToRange() | |
Apply the table style to the range.
|
||
void | convertToRange() | |
Convert the table to range.
|
||
void | convertToRange(TableToRangeOptions options) | |
Convert the table to range.
|
||
void | putCellValue(int rowOffset, int columnOffset, java.lang.Object value) | |
Put the value to the cell.
|
||
void | resize(int startRow, int startColumn, int endRow, int endColumn, boolean hasHeaders) | |
Resize the range of the list object.
|
||
void | updateColumnName() | |
Updates all list columns' name from the worksheet.
|
public int getStartRow()
public int getStartColumn()
public int getEndRow()
public int getEndColumn()
public ListColumnCollection getListColumns()
public boolean getShowHeaderRow() / public void setShowHeaderRow(boolean value)
public boolean getShowTotals() / public void setShowTotals(boolean value)
public Range getDataRange()
public QueryTable getQueryTable()
public int getDataSourceType()
public AutoFilter getAutoFilter()
public java.lang.String getDisplayName() / public void setDisplayName(java.lang.String value)
public java.lang.String getComment() / public void setComment(java.lang.String value)
public boolean getShowTableStyleFirstColumn() / public void setShowTableStyleFirstColumn(boolean value)
public boolean getShowTableStyleLastColumn() / public void setShowTableStyleLastColumn(boolean value)
public boolean getShowTableStyleRowStripes() / public void setShowTableStyleRowStripes(boolean value)
public boolean getShowTableStyleColumnStripes() / public void setShowTableStyleColumnStripes(boolean value)
public int getTableStyleType() / public void setTableStyleType(int value)
public java.lang.String getTableStyleName() / public void setTableStyleName(java.lang.String value)
public XmlMap getXmlMap()
public java.lang.String getAlternativeText() / public void setAlternativeText(java.lang.String value)
public java.lang.String getAlternativeDescription() / public void setAlternativeDescription(java.lang.String value)
public void resize(int startRow, int startColumn, int endRow, int endColumn, boolean hasHeaders)
startRow
- The start row index of the new range.startColumn
- The start column index of the new range.endRow
- The end row index of the new range.endColumn
- The end column index of the new range.hasHeaders
- Whether the ListObject has has headers.public void putCellValue(int rowOffset, int columnOffset, java.lang.Object value)
rowOffset
- The row offset.columnOffset
- The column offset.value
- The cell value.public void updateColumnName()
public void applyStyleToRange()
public void convertToRange()
public void convertToRange(TableToRangeOptions options)
options
- the options when converting table to range.