ListObject
ListObject class
Represents a list object on a worksheet. The ListObject object is a member of the ListObjects collection. The ListObjects collection contains all the list objects on a worksheet.
Properties
| Name | Type | Description |
|---|---|---|
| StartRow | int | Gets the start row of the range. |
| StartColumn | int | Gets the start column of the range. |
| EndRow | int | Gets the end row of the range. |
| EndColumn | int | Gets the end column of the range. |
| ListColumns | ListColumnCollection | Gets ListColumns of the ListObject. |
| ShowHeaderRow | boolean | Gets and sets whether this ListObject show header row. |
| ShowTotals | boolean | Gets and sets whether this ListObject show total row. |
| DataRange | Range | Gets the data range of the ListObject. |
| QueryTable | QueryTable | Gets the linked QueryTable. |
| DataSourceType | int | Gets the data source type of the table. The value of the property is TableDataSourceType integer constant. |
| HasAutoFilter | boolean | |
| AutoFilter | AutoFilter | Gets auto filter. |
| DisplayName | String | Gets and sets the display name. |
| Comment | String | Gets and sets the comment of the table. |
| ShowTableStyleFirstColumn | boolean | Indicates whether the first column in the table should have the style applied. |
| ShowTableStyleLastColumn | boolean | Indicates whether the last column in the table should have the style applied. |
| ShowTableStyleRowStripes | boolean | Indicates whether row stripe formatting is applied. |
| ShowTableStyleColumnStripes | boolean | Indicates whether column stripe formatting is applied. |
| TableStyleType | int | Gets and the built-in table style. The value of the property is TableStyleType integer constant. |
| TableStyleName | String | Gets and sets the table style name. |
| XmlMap | XmlMap | Gets an XmlMap used for this list. |
| AlternativeText | String | Gets and sets the alternative text. |
| AlternativeDescription | String | Gets and sets the alternative description. |
Methods
| Name | Description |
|---|---|
| resize | Resize the range of the list object. |
| putCellValue | Put the value to the cell. |
| putCellFormula | Put the formula to the cell in the table. |
| updateColumnName | Updates all list columns’ name from the worksheet. |
The value of the cells in the header row of the table must be same a | | removeAutoFilter | | | filter | Filter the table. | | applyStyleToRange | Apply the table style to the range. | | convertToRange | Convert the table to range. |
ListObject.StartRow property
Gets the start row of the range.
Type: int
ListObject.StartColumn property
Gets the start column of the range.
Type: int
ListObject.EndRow property
Gets the end row of the range.
Type: int
ListObject.EndColumn property
Gets the end column of the range.
Type: int
ListObject.ListColumns property
Gets ListColumns of the ListObject.
Type: ListColumnCollection
ListObject.ShowHeaderRow property
Gets and sets whether this ListObject show header row.
Type: boolean
ListObject.ShowTotals property
Gets and sets whether this ListObject show total row.
Type: boolean
ListObject.DataRange property
Gets the data range of the ListObject.
Type: Range
ListObject.QueryTable property
Gets the linked QueryTable.
Type: QueryTable
ListObject.DataSourceType property
Gets the data source type of the table. The value of the property is TableDataSourceType integer constant.
Type: int
ListObject.HasAutoFilter property
Type: boolean
ListObject.AutoFilter property
Gets auto filter.
Type: AutoFilter
ListObject.DisplayName property
Gets and sets the display name.
Type: String
ListObject.Comment property
Gets and sets the comment of the table.
Type: String
ListObject.ShowTableStyleFirstColumn property
Indicates whether the first column in the table should have the style applied.
Type: boolean
ListObject.ShowTableStyleLastColumn property
Indicates whether the last column in the table should have the style applied.
Type: boolean
ListObject.ShowTableStyleRowStripes property
Indicates whether row stripe formatting is applied.
Type: boolean
ListObject.ShowTableStyleColumnStripes property
Indicates whether column stripe formatting is applied.
Type: boolean
ListObject.TableStyleType property
Gets and the built-in table style. The value of the property is TableStyleType integer constant.
Type: int
ListObject.TableStyleName property
Gets and sets the table style name.
Type: String
ListObject.XmlMap property
Gets an XmlMap used for this list.
Type: XmlMap
ListObject.AlternativeText property
Gets and sets the alternative text.
Type: String
ListObject.AlternativeDescription property
Gets and sets the alternative description.
Type: String
resize(startRow, startColumn, endRow, endColumn, hasHeaders)
Resize the range of the list object.
| Parameter | Type | Description |
|---|---|---|
| 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 this table has headers. |
putCellValue(rowOffset, columnOffset, value) (1 of 2)
Put the value to the cell.
| Parameter | Type | Description |
|---|---|---|
| rowOffset | int | The row offset in the table. |
| columnOffset | int | The column offset in the table. |
| value | Object | The cell value. |
putCellValue(rowOffset, columnOffset, value, isTotalsRowLabel) (2 of 2)
Put the value to the cell.
| Parameter | Type | Description |
|---|---|---|
| rowOffset | int | The row offset in the table. |
| columnOffset | int | The column offset in the table. |
| value | Object | The cell value. |
| isTotalsRowLabel | boolean | Indicates whether it is a label for total row,only works for total row. If False and this row is total row, a new row will be inserted. |
putCellFormula(rowOffset, columnOffset, formula) (1 of 2)
Put the formula to the cell in the table.
| Parameter | Type | Description |
|---|---|---|
| rowOffset | int | The row offset in the table. |
| columnOffset | int | The column offset in the table. |
| formula | String | The formula of the cell. |
putCellFormula(rowOffset, columnOffset, formula, isTotalsRowFormula) (2 of 2)
Put the formula to the cell in the table.
| Parameter | Type | Description |
|---|---|---|
| rowOffset | int | The row offset in the table. |
| columnOffset | int | The column offset in the table. |
| formula | String | The formula of the cell. |
| isTotalsRowFormula | boolean |
updateColumnName()
Updates all list columns’ name from the worksheet.
The value of the cells in the header row of the table must be same as the name of the ListColumn; Cell.PutValue do not auto modify the name of the ListColumn for performance.
removeAutoFilter()
filter()
Filter the table.
applyStyleToRange()
Apply the table style to the range.
convertToRange() (1 of 2)
Convert the table to range.
convertToRange(options) (2 of 2)
Convert the table to range.
| Parameter | Type | Description |
|---|---|---|
| options | TableToRangeOptions | the options when converting table to range. |