Represents a region of cells formatted as a table.

Tables assist in managing and analyzing a range of related data. This management can be done separately from the rest of the data in the worksheet.

A table can have one or more columns sorted and filtered. There are various sorting and filtering criteria that can be applied to the columns. The types pertaining to filtering can be found in the Infragistics.Documents.Excel.Filtering namespace and a filter can be applied to a column by setting the [[WorksheetTableColumn.filter]] property. The types pertaining to sorting can be found in the Infragistics.Documents.Excel.Sorting namespace and a column can be sorted by setting the [[WorksheetTableColumn.sortCondition]] or by populating the [[SortSettings`1.sortConditions]] collection on the [[sortSettings]].

A table can contain calculated columns which dynamically determine their value based on a formula. A [[WorksheetTableColumn]] can be made a calculated column by setting the [[WorksheetTableColumn.columnFormula]].

A table can also contain a totals row which display total information about the table. This can be shown by setting [[isTotalsRowVisible]] to True. When the totals row is displayed, each column can display text or a calculated value in the totals row, by setting either the [[WorksheetTableColumn.totalLabel]] or [[WorksheetTableColumn.totalFormula]], respectively.

See

  • [[Worksheet.tables]]
  • [[WorksheetRegion.formatAsTable]]
  • [[WorksheetRegion.formatAsTable]]
  • [[WorksheetCell.associatedTable]]
  • [[WorksheetRow.getCellAssociatedTable]]

Hierarchy

Hierarchy (view full)

Implements

Constructors

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get comment(): string
  • Gets or sets the comment associated with the named reference or table. The comment associated with the named reference or table.

    Throws

    [[ArgumentException]] The value assigned is greater than 255 characters in length.

    Returns string

  • set comment(a): void
  • Parameters

    • a: string

    Returns void

  • get dataAreaRegion(): WorksheetRegion
  • Gets the [[WorksheetRegion]] which represents the region of cells in the data area of the table.

    The data area of the table can be changed by using one of the Resize overloads.

    See

    • [[resize]]
    • [[resize]]

    Returns WorksheetRegion

  • get displayBandedColumns(): boolean
  • Gets or sets the value which indicates whether the alternate column format should be applied to the appropriate columns of the [[WorksheetTable]].

    The column formats are defined by the [[WorksheetTableStyle]] applied to the WorksheetTable. These are stored in the [[WorksheetTableStyle.areaFormats]] collection and keyed by the [[WorksheetTableStyleArea]].ColumnStripe and WorksheetTableStyleArea.AlternateColumnStripe values. If there is no area format applied for the AlternateColumnStripe value, this property has no effect on the display of the table.

    If this value is True and there is an area format for the alternate column stripe, the stripe widths are defined by the [[WorksheetTableStyle.columnStripeWidth]] and [[WorksheetTableStyle.alternateColumnStripeWidth]] values.

    See

    • [[style]]
    • [[WorksheetTableStyle.areaFormats]]
    • [[WorksheetTableStyleArea]]
    • [[WorksheetTableStyle.columnStripeWidth]]
    • [[WorksheetTableStyle.alternateColumnStripeWidth]]

    Returns boolean

  • set displayBandedColumns(a): void
  • Parameters

    • a: boolean

    Returns void

  • get displayBandedRows(): boolean
  • Gets or sets the value which indicates whether the alternate row format should be applied to the appropriate rows of the [[WorksheetTable]].

    The row formats are defined by the [[WorksheetTableStyle]] applied to the WorksheetTable. These are stored in the [[WorksheetTableStyle.areaFormats]] collection and keyed by the [[WorksheetTableStyleArea]].RowStripe and WorksheetTableStyleArea.AlternateRowStripe values. If there is no area format applied for the AlternateRowStripe value, this property has no effect on the display of the table.

    If this value is True and there is an area format for the alternate row stripe, the stripe widths are defined by the [[WorksheetTableStyle.rowStripeHeight]] and [[WorksheetTableStyle.alternateRowStripeHeight]] values.

    See

    • [[style]]
    • [[WorksheetTableStyle.areaFormats]]
    • [[WorksheetTableStyleArea]]
    • [[WorksheetTableStyle.rowStripeHeight]]
    • [[WorksheetTableStyle.alternateRowStripeHeight]]

    Returns boolean

  • set displayBandedRows(a): void
  • Parameters

    • a: boolean

    Returns void

  • get displayFirstColumnFormatting(): boolean
  • Gets or sets the value which indicates whether the first column format should be applied to the appropriate column of the [[WorksheetTable]].

    The first column format is defined by the [[WorksheetTableStyle]] applied to the WorksheetTable. It is stored in the [[WorksheetTableStyle.areaFormats]] collection and keyed by the [[WorksheetTableStyleArea]].FirstColumn value. If there is no area format applied for the FirstColumn value, this property has no effect on the display of the table.

    If there is only one column in the table and both the first and last column formatting should be applied, the last column format will take precedence.

    See

    • [[displayLastColumnFormatting]]
    • [[style]]
    • [[WorksheetTableStyle.areaFormats]]
    • [[WorksheetTableStyleArea]]

    Returns boolean

  • set displayFirstColumnFormatting(a): void
  • Parameters

    • a: boolean

    Returns void

  • get displayLastColumnFormatting(): boolean
  • Gets or sets the value which indicates whether the last column format should be applied to the appropriate column of the [[WorksheetTable]].

    The last column format is defined by the [[WorksheetTableStyle]] applied to the WorksheetTable. It is stored in the [[WorksheetTableStyle.areaFormats]] collection and keyed by the [[WorksheetTableStyleArea]].LastColumn value. If there is no area format applied for the LastColumn value, this property has no effect on the display of the table.

    If there is only one column in the table and both the first and last column formatting should be applied, the last column format will take precedence.

    See

    • [[displayFirstColumnFormatting]]
    • [[style]]
    • [[WorksheetTableStyle.areaFormats]]
    • [[WorksheetTableStyleArea]]

    Returns boolean

  • set displayLastColumnFormatting(a): void
  • Parameters

    • a: boolean

    Returns void

  • get headerRowRegion(): WorksheetRegion
  • Gets the [[WorksheetRegion]] which represents the region of cells in the header row of the table. A WorksheetRegion which represents the region of cells in the header row of the table or null if the header row is not visible.

    See

    • [[isHeaderRowVisible]]
    • [[resize]]
    • [[resize]]

    Returns WorksheetRegion

  • get isFilterUIVisible(): boolean
  • Gets or sets the value indicating whether to allow filtering and show filter buttons in the table headers.

    If [[isHeaderRowVisible]] is False, this property must be False and setting it to True will cause an error. If [[isHeaderRowVisible]] is set to True, this property will also be set to True automatically.

    Throws

    [[InvalidOperationException]] The value assigned is True and [[isHeaderRowVisible]] is False.

    See

    [[isHeaderRowVisible]]

    Returns boolean

  • set isFilterUIVisible(a): void
  • Parameters

    • a: boolean

    Returns void

  • get isHeaderRowVisible(): boolean
  • Gets or sets the value which indicates whether the row containing column headers should be displayed.

    When the header row is visible, the cell above each column of data will contain the [[WorksheetTableColumn.name]] value. Therefore, all header cells always contain a string value. Additionally, they will all be unique.

    True if the row containing column headers is visible; False if it is hidden.

    See

    [[WorksheetTableColumn.name]]

    Returns boolean

  • set isHeaderRowVisible(a): void
  • Parameters

    • a: boolean

    Returns void

  • get isTotalsRowVisible(): boolean
  • Gets or sets the value which indicates whether the row containing column totals should be displayed.

    When the totals row is visible, the cell below each column of data will contain either a calculated value, a text value, or nothing. To display a calculated value in the cell, set the [[WorksheetTableColumn.totalFormula]]. To display a text label, set the [[WorksheetTableColumn.totalLabel]]. If both are set, the calculated value takes precedence.

    True if the row containing column totals is visible; False if it is hidden.

    Throws

    [[InvalidOperationException]] The value is set to True and the table occupies the last row of the worksheet.

    See

    • [[WorksheetTableColumn.totalFormula]]
    • [[WorksheetTableColumn.totalLabel]]

    Returns boolean

  • set isTotalsRowVisible(a): void
  • Parameters

    • a: boolean

    Returns void

  • get name(): string
  • Gets or sets the name of the reference.

    See the overview on [[scope]] for details on how to access a named reference by name in formulas.

    The name of the reference.

    Throws

    [[ArgumentNullException]] The value assigned is null or empty.

    Throws

    [[ArgumentException]] The value assigned is longer than 255 characters.

    Throws

    [[ArgumentException]] The value assigned is not a valid named reference. The name must begin with a letter, underscore (), or a backslash (). All other characters in the name must be letters, numbers, periods, underscores (), or backslashes (). The name cannot be a an A1 cell reference (1 to 3 letters followed by 1 to 6 numbers). In addition, the name cannot be 'r', 'R', 'c', or 'C' or start with a row or column reference in R1C1 cell reference mode ('R' followed by 1 to 6 numbers or 'C' followed by 1 to 6 numbers).

    Throws

    [[InvalidOperationException]] The value assigned is the name of another named reference with the same Scope. Names are compared case-insensitively.

    Returns string

  • set name(a): void
  • Parameters

    • a: string

    Returns void

  • get scope(): any
  • Gets the scope of the named reference.

    This can either be the workbook which the named reference belongs to or one of the worksheets in the workbook.

    The scope determines how formulas need to preface a name in order to use the named reference.

    If the scope is the workbook, formulas in any cell in the workbook can reference the named reference by specifying just the name or the workbook's file name, an exclamation point, and the name: =MyWorkbookName ='C:\MyWorkbook.xls'!MyWorkbookName When cells in other workbook's want to reference the named reference, they must use the second format by first specifying the file name when the workbook-scoped named reference exists.

    If the scope is a worksheet, formulas in cells of the worksheet can reference the named reference by specifying just the name. In addition, they can fully qualify the named reference with the worksheet name and, optionally, the workbook file name: =MyWorksheetName =Sheet1!MyWorksheetName ='C:\[MyWorkbook.xls]Sheet1'!MyWorksheetName Formulas in cells of other worksheets in the same workbook can use the named reference as well, but they must specify the worksheet name and, optionally, the workbook file name: =Sheet2!OtherWorksheetName ='C:\[MyWorkbook.xls]Sheet2'!OtherWorksheetName Formulas in cells of other workbooks can also used the named reference, but they must specify the workbook file name, worksheet name, and named reference name.

    The scope of the named reference.

    Returns any

  • get sortSettings(): SortSettings$1<WorksheetTableColumn>
  • Gets the settings which determine how the data within the table should be sorted.

    Note: Sort conditions are not constantly evaluated as data within the table changes. Sort conditions are applied to the table only when they are are added or removed on a column in the table or when the [[reapplySortConditions]] method is called.

    See

    • [[reapplySortConditions]]
    • [[WorksheetTableColumn.sortCondition]]

    Returns SortSettings$1<WorksheetTableColumn>

  • get style(): WorksheetTableStyle
  • Gets or sets the style to use on the [[WorksheetTable]].

    The [[WorksheetTableStyle]] defines formats to use in various areas of the table. These formats are used as defaults for cells which don't have their formatting properties already set.

    The area formats specified in the WorksheetTableStyle are differential formats. In other words, only the properties that are set to non-default values will be applied to the appropriate cells. An area format can define only a background color or only font information and that format will be applied to the cells while all other formatting properties on the cells will be maintained.

    If this value is set to null, the Style will be set to the [[Workbook.defaultTableStyle]].

    The [[WorksheetTableStyle]] instance which defines the various default table area formats.

    Throws

    [[ArgumentException]] The value specified is not in the [[Workbook.customTableStyles]] or [[Workbook.standardTableStyles]] collections.

    See

    • [[Workbook.defaultTableStyle]]
    • [[Workbook.customTableStyles]]
    • [[Workbook.standardTableStyles]]

    Returns WorksheetTableStyle

  • set style(a): void
  • Parameters

    Returns void

  • get totalsRowRegion(): WorksheetRegion
  • Gets the [[WorksheetRegion]] which represents the region of cells in the totals row of the table. A WorksheetRegion which represents the region of cells in the totals row of the table or null if the totals row is not visible.

    See

    • [[isTotalsRowVisible]]
    • [[resize]]
    • [[resize]]

    Returns WorksheetRegion

  • get wholeTableRegion(): WorksheetRegion
  • Gets the [[WorksheetRegion]] which represents the region of cells in the whole table, including the header and totals rows, if visible.

    The table region can be changed by using one of the Resize overloads.

    See

    • [[resize]]
    • [[resize]]

    Returns WorksheetRegion

  • get worksheet(): Worksheet
  • Gets the [[worksheet]] to which the table belongs. The Worksheet to which the table belongs or null if the table has been removed from the Worksheet.

    See

    [[Worksheet.tables]]

    Returns Worksheet

Methods

  • Gets the format for the specified area. An [[IWorksheetCellFormat]] instance describing the appearance of the specified area.

    Throws

    [[InvalidEnumArgumentException]] 'area' is not defined.

    Parameters

    Returns IWorksheetCellFormat

  • Gets the collection of formats used for each area of the [[WorksheetTable]].

    The available areas of the table which can have a format set are the whole table, header, data, and totals areas.

    Applying a format to an area will apply the format to all cells in that area.

    If any area formats on the tables are set when the table is resized to give it more columns, the area formats of the new columns will be initialized with the area formats from the table.

    See

    • [[WorksheetTableColumn.filter]]
    • [[WorksheetTableColumn.areaFormats]]
    • [[WorksheetTableStyle]]
    • [[resize]]
    • [[resize]]

    Returns WorksheetTableAreaFormatsCollection$1<WorksheetTableArea>

  • Clears all filters from the columns in the table.

    If any filters are present and removed when this is called, all hidden rows in the data area of the table will be unhidden.

    See

    • [[reapplyFilters]]
    • [[WorksheetTableColumn.filter]]

    Returns void

  • Clears all sort conditions from the columns in the table.

    Note: Just as in Microsoft Excel, clearing the sort conditions will not revert the table back to its original unsorted state. The table will remain in its last sorted order.

    See

    • [[sortSettings]]
    • [[WorksheetTableColumn.sortCondition]]

    Returns void

  • Gets the [[WorksheetTableColumn]] at the specified index.

    Throws

    [[ArgumentOutOfRangeException]] 'index' is less than 0 or greater than or equal to the number of columns in the collection.

    Parameters

    • index: number

      The 0-based index of the column to get.

    Returns WorksheetTableColumn

  • Gets the [[WorksheetTableColumn]] with the specified name or null if it doesn't exist.

    Column names are compared case-insensitively.

    See

    [[WorksheetTableColumn.name]]

    Parameters

    • name: string

      The name of the column to get.

    Returns WorksheetTableColumn

  • Gets the collection of columns in the table.

    Each column is represented by a [[WorksheetTableColumn]] instance and contains various settings for controlling the contents, formatting, sorting, and filtering of the column.

    See

    [[WorksheetTableColumn]]

    Returns WorksheetTableColumnCollection

  • Deletes one or more columns from the table

    Throws

    [[InvalidOperationException]] If the operation is not allowed, e.g. if it would cause data to be shifted off the worksheet.

    Throws

    [[IndexOutOfRangeException]] If index is negative.

    Throws

    [[ArgumentOutOfRangeException]] If count is less than 1 or greater than or equal all the columns in the table.

    Parameters

    • tableColumnIndex: number

      The deletion start relative to the first column in the table.

    • Optional count: number

      The number of columns to delete.

    Returns void

  • Deletes one or more data rows from the table

    Throws

    [[InvalidOperationException]] If the operation is not allowed, e.g. if it would cause data to be shifted off the worksheet.

    Throws

    [[IndexOutOfRangeException]] If index is negative.

    Throws

    [[ArgumentOutOfRangeException]] If count is less than 1 or greater than or equal all the rows (excluding header and total rows) in the table.

    Parameters

    • dataRowIndex: number

      The deletion start relative to the first row in the [[dataAreaRegion]].

    • Optional count: number

      The number of rows to delete.

    Returns void

  • Parameters

    • other: any

    Returns boolean

  • Returns number

  • Inserts one or more columns into the table

    Throws

    [[InvalidOperationException]] If the operation is not allowed, e.g. if it would cause data to be shifted off the worksheet.

    Throws

    [[IndexOutOfRangeException]] If index is negative.

    Throws

    [[ArgumentOutOfRangeException]] If count is less than 1.

    Parameters

    • tableColumnIndex: number

      The insertion point relative to the first column in the table.

    • Optional count: number

      The number of columns to insert

    Returns void

  • Inserts one or more data rows into the table

    Throws

    [[InvalidOperationException]] If the operation is not allowed, e.g. if it would cause data to be shifted off the worksheet.

    Throws

    [[IndexOutOfRangeException]] If index is negative.

    Throws

    [[ArgumentOutOfRangeException]] If count is less than 1.

    Parameters

    • dataRowIndex: number

      The insertion point relative to the first row in the [[dataAreaRegion]].

    • Optional count: number

      The number of columns to insert

    Returns void

  • Re-filters all data cells in the table based on the filters from the columns in the table.

    Filters are not constantly evaluated as data within the table changes. Filters are applied to the table only when they are added or removed on a column in the table or when the ReapplyFilters method is called.

    If no columns in the table have filters set, this method will not do anything to the data.

    Note: When the filters are reevaluated, the rows of any cells which don't meet the filter criteria of their column will be hidden. When a row is filtered out, the entire row is hidden from the worksheet, so any data outside the table but in the same row will also be hidden.

    See

    • [[clearFilters]]
    • [[WorksheetTableColumn.filter]]

    Returns void

  • Re-sorts all data cells in the table based on the sort conditions from the columns in the table.

    See

    • [[sortSettings]]
    • [[WorksheetTableColumn.sortCondition]]

    Returns void

  • Resizes the table to a new range of data on the worksheet.

    If the totals row is visible, it will be placed below the last data row automatically. If the totals row is currently inside the new table region, it will be moved out to below the new data rows, which will be shifted up by one row.

    Throws

    [[InvalidOperationException]] Occurs when the [[WorksheetTable]] has previously been removed from the worksheet.

    Throws

    [[ArgumentNullException]] Occurs when 'headerAndDataRegion' is null.

    Throws

    [[ArgumentException]] Occurs when 'headerAndDataRegion' from a different worksheet or has been previously shifted off the table's worksheet.

    Throws

    [[ArgumentException]] Occurs when the top of the 'headerAndDataRegion' does is not the same as the top of the table.

    Throws

    [[ArgumentException]] Occurs when the 'headerAndDataRegion' does not contain at least one data row for the table.

    Throws

    [[ArgumentException]] Occurs when the 'headerAndDataRegion' does not overlap the current table region.

    Throws

    [[InvalidOperationException]] Occurs when the there is a merged cell, array formula, data table, or another table in the new region.

    Parameters

    • headerAndDataRegion: WorksheetRegion

      The new region of headers (if currently visible) and data for the table, which must contain at least one data row, and overlap and have the same top as the current table region.

    Returns void

  • Resizes the table to a new range of data on the worksheet.

    If the totals row is visible, it will be placed below the last data row automatically. If the totals row is currently inside the new table region, it will be moved out to below the new data rows, which will be shifted up by one row.

    Throws

    [[InvalidOperationException]] Occurs when the [[WorksheetTable]] has previously been removed from the worksheet.

    Throws

    [[ArgumentNullException]] Occurs when 'headerAndDataRegionAddress' is null.

    Throws

    [[ArgumentException]] Occurs when 'headerAndDataRegionAddress' is not a valid name or a valid cell or region address in the workbook's cell reference mode.

    Throws

    [[InvalidOperationException]] Occurs when 'headerAndDataRegionAddress' is a relative R1C1 address. The overload taking an origin cell must be used to resolve relative R1C1 references.

    Throws

    [[ArgumentException]] Occurs when the top of the 'headerAndDataRegionAddress' does is not the same as the top of the table.

    Throws

    [[ArgumentException]] Occurs when the 'headerAndDataRegionAddress' does not contain at least one data row for the table.

    Throws

    [[ArgumentException]] Occurs when the 'headerAndDataRegionAddress' does not overlap the current table region.

    Throws

    [[InvalidOperationException]] Occurs when the there is a merged cell, array formula, data table, or another table in the new region.

    Parameters

    • headerAndDataRegionAddress: string

      The address of the new region of headers (if currently visible) and data for the table, which must contain at least one data row, and overlap and have the same top as the current table region.

    Returns void

  • Resizes the table to a new range of data on the worksheet.

    If the totals row is visible, it will be placed below the last data row automatically. If the totals row is currently inside the new table region, it will be moved out to below the new data rows, which will be shifted up by one row.

    Throws

    [[InvalidOperationException]] Occurs when the [[WorksheetTable]] has previously been removed from the worksheet.

    Throws

    [[ArgumentNullException]] Occurs when 'headerAndDataRegionAddress' is null.

    Throws

    [[ArgumentException]] Occurs when 'headerAndDataRegionAddress' is not a valid name or a valid cell or region address in the workbook's cell reference mode.

    Throws

    [[InvalidOperationException]] Occurs when 'headerAndDataRegionAddress' is a relative R1C1 address. The overload taking an origin cell must be used to resolve relative R1C1 references.

    Throws

    [[ArgumentException]] Occurs when the top of the 'headerAndDataRegionAddress' does is not the same as the top of the table.

    Throws

    [[ArgumentException]] Occurs when the 'headerAndDataRegionAddress' does not contain at least one data row for the table.

    Throws

    [[ArgumentException]] Occurs when the 'headerAndDataRegionAddress' does not overlap the current table region.

    Throws

    [[InvalidOperationException]] Occurs when the there is a merged cell, array formula, data table, or another table in the new region.

    Parameters

    • headerAndDataRegionAddress: string

      The address of the new region of headers (if currently visible) and data for the table, which must contain at least one data row, and overlap and have the same top as the current table region.

    • cellReferenceMode: CellReferenceMode

      The cell reference mode to use to parse the region address.

    Returns void

  • Gets the string representation of the table.

    Returns string

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns boolean

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns number

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Returns void