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

NameTypeDescription
StartRowNumberGets the start row of the range.
StartColumnNumberGets the start column of the range.
EndRowNumberGets the end row of the range.
EndColumnNumberGets the end column of the range.
ListColumnsListColumnCollectionGets ListColumns of the ListObject.
ShowHeaderRowbooleanGets and sets whether this ListObject show header row.
ShowTotalsbooleanGets and sets whether this ListObject show total row.
DataRangeRangeGets the data range of the ListObject.
QueryTableQueryTableGets the linked QueryTable.
DataSourceTypeNumberGets the data source type of the table. The value of the property is TableDataSourceType integer constant.
HasAutoFilterboolean
AutoFilterAutoFilterGets auto filter.
DisplayNameStringGets and sets the display name.
CommentStringGets and sets the comment of the table.
ShowTableStyleFirstColumnbooleanIndicates whether the first column in the table should have the style applied.
ShowTableStyleLastColumnbooleanIndicates whether the last column in the table should have the style applied.
ShowTableStyleRowStripesbooleanIndicates whether row stripe formatting is applied.
ShowTableStyleColumnStripesbooleanIndicates whether column stripe formatting is applied.
TableStyleTypeNumberGets and the built-in table style. The value of the property is TableStyleType integer constant.
TableStyleNameStringGets and sets the table style name.
XmlMapXmlMapGets an XmlMap used for this list.
AlternativeTextStringGets and sets the alternative text.
AlternativeDescriptionStringGets and sets the alternative description.

Methods

NameDescription
resizeResize the range of the list object.
putCellValuePut the value to the cell.
putCellFormulaPut the formula to the cell in the table.
updateColumnNameUpdates 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: Number

ListObject.StartColumn property

Gets the start column of the range.

Type: Number

ListObject.EndRow property

Gets the end row of the range.

Type: Number

ListObject.EndColumn property

Gets the end column of the range.

Type: Number

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: Number

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: Number

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.

ParameterTypeDescription
startRowNumberThe start row index of the new range.
startColumnNumberThe start column index of the new range.
endRowNumberThe end row index of the new range.
endColumnNumberThe end column index of the new range.
hasHeadersbooleanWhether this table has headers.

putCellValue(rowOffset, columnOffset, value) (1 of 2)

Put the value to the cell.

ParameterTypeDescription
rowOffsetNumberThe row offset in the table.
columnOffsetNumberThe column offset in the table.
valueObjectThe cell value.

putCellValue(rowOffset, columnOffset, value, isTotalsRowLabel) (2 of 2)

Put the value to the cell.

ParameterTypeDescription
rowOffsetNumberThe row offset in the table.
columnOffsetNumberThe column offset in the table.
valueObjectThe cell value.
isTotalsRowLabelbooleanIndicates 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.

ParameterTypeDescription
rowOffsetNumberThe row offset in the table.
columnOffsetNumberThe column offset in the table.
formulaStringThe formula of the cell.

putCellFormula(rowOffset, columnOffset, formula, isTotalsRowFormula) (2 of 2)

Put the formula to the cell in the table.

ParameterTypeDescription
rowOffsetNumberThe row offset in the table.
columnOffsetNumberThe column offset in the table.
formulaStringThe formula of the cell.
isTotalsRowFormulaboolean

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.

ParameterTypeDescription
optionsTableToRangeOptionsthe options when converting table to range.