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