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 | setShowTableStyleColumnStripes(value) | |
Indicates whether column stripe formatting is applied. | ||
method | getShowTableStyleFirstColumn() | |
method | setShowTableStyleFirstColumn(value) | |
Inidicates 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 | 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. |
Property Getters/Setters Detail |
---|
getStartRow : int | |
int getStartRow() |
getStartColumn : int | |
int getStartColumn() |
getEndRow : int | |
int getEndRow() |
getEndColumn : int | |
int getEndColumn() |
getListColumns : ListColumnCollection | |
ListColumnCollection getListColumns() |
getShowHeaderRow/setShowHeaderRow : boolean | |
boolean getShowHeaderRow() / setShowHeaderRow(value) |
getShowTotals/setShowTotals : boolean | |
boolean getShowTotals() / setShowTotals(value) |
getDataRange : Range | |
Range getDataRange() |
getQueryTable : QueryTable | |
QueryTable getQueryTable() |
getDataSourceType : int | |
int getDataSourceType() |
getAutoFilter : AutoFilter | |
AutoFilter getAutoFilter() |
getDisplayName/setDisplayName : String | |
String getDisplayName() / setDisplayName(value) |
getComment/setComment : String | |
String getComment() / setComment(value) |
getShowTableStyleFirstColumn/setShowTableStyleFirstColumn : boolean | |
boolean getShowTableStyleFirstColumn() / setShowTableStyleFirstColumn(value) |
getShowTableStyleLastColumn/setShowTableStyleLastColumn : boolean | |
boolean getShowTableStyleLastColumn() / setShowTableStyleLastColumn(value) |
getShowTableStyleRowStripes/setShowTableStyleRowStripes : boolean | |
boolean getShowTableStyleRowStripes() / setShowTableStyleRowStripes(value) |
getShowTableStyleColumnStripes/setShowTableStyleColumnStripes : boolean | |
boolean getShowTableStyleColumnStripes() / setShowTableStyleColumnStripes(value) |
getTableStyleType/setTableStyleType : int | |
int getTableStyleType() / setTableStyleType(value) |
getTableStyleName/setTableStyleName : String | |
String getTableStyleName() / setTableStyleName(value) |
getXmlMap : XmlMap | |
XmlMap getXmlMap() |
getAlternativeText/setAlternativeText : String | |
String getAlternativeText() / setAlternativeText(value) |
getAlternativeDescription/setAlternativeDescription : String | |
String getAlternativeDescription() / setAlternativeDescription(value) |
Method Detail |
---|
resize | |
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 has headers.putCellValue | |
putCellValue(rowOffset, columnOffset, value) |
rowOffset: int
- The row offset.columnOffset: int
- The column offset.value: Object
- The cell value.updateColumnName | |
updateColumnName() |
applyStyleToRange | |
applyStyleToRange() |
convertToRange | |
convertToRange() |
convertToRange | |
convertToRange(options) |
options: TableToRangeOptions
- the options when converting table to range.