ig.excel.WorksheetTableCollection

The collection of WorksheetTable instances on a Worksheet.

Dependencies

jquery-1.4.4.js
infragistics.util.js
The current widget has no options.
The current widget has no events.
  • add

    .add( region:string, tableHasHeaders:boolean, [tableStyle:ig.excel.WorksheetTableStyle] );
    Return Type:
    ig.excel.WorksheetTable
    Return Type Description:
    The WorksheetTable created the represent the formatted table for the region.

    Formats a region as a table and adds an associated WorksheetTable to the collection.

    • region
    • Type:string
    • The region to format as a table.
    • tableHasHeaders
    • Type:boolean
    • A value which indicates whether the top row of the region contains the headers for the table.
    • tableStyle
    • Type:ig.excel.WorksheetTableStyle
    • Optional
    • The WorksheetTableStyle to apply to the table or null to use the Workbook.defaultTableStyle.

    Exceptions

    Exception Description
    ig.InvalidOperationException The owning worksheet has been removed from its workbook.
    ig.InvalidOperationException The region contains one or more cells from another WorksheetTable.
    ig.InvalidOperationException The region contains one or more cells which have a multi-cell ArrayFormula applied.
    ig.InvalidOperationException The region contains one or more cells which are part of a WorksheetDataTable.
    ig.ArgumentNullException region is null or empty.
    ig.ArgumentException region is not a valid region address in the workbook's cell reference mode.
    ig.ArgumentException The specified tableStyle does not exist in the Workbook.customTableStyles or Workbook.standardTableStyles collections.

    Remarks

    When the table is created, the specified tableStyle will be applied to the value.

    When the table is created, the column names will be taken from the cells in the header row if tableHasHeaders is True. If it is False, the column names will be generated and the cells for the header row will be inserted into the worksheet.

    The column names are unique within the owning WorksheetTable. If, when the table is created, there are two or more columns with the same name, the second and subsequent duplicate column names will have a number appended to make them unique. If any cells in the header row have a non-string value, their value will be changed to a string (the current display text of the cell). If any cells in the header row have no value, they will be given a generated column name.

    If the region partially contains any merged cell regions, they will be removed from the worksheet and the table region will be expanded to include all cells from the merged region.

  • clear

    .clear( );

    Clears the collection and removes all tables from the worksheet.

  • contains

    .contains( table:ig.excel.WorksheetTable );
    Return Type:
    boolean
    Return Type Description:
    True if the WorksheetTable is in the collection; False otherwise.

    Determines whether the specified WorksheetTable is in the collection.

    • table
    • Type:ig.excel.WorksheetTable
    • The WorksheetTable to find in the collection.
  • count

    .count( );
    Return Type:
    number
    Return Type Description:
    The number of tables in the collection.

    Gets the number of tables in the collection.

  • exists

    .exists( name:string );
    Return Type:
    boolean
    Return Type Description:
    True if a WorksheetTable with the specified name is in the collection; False otherwise.

    Determines whether a WorksheetTable with the specified name is in the collection.

    • name
    • Type:string
    • The name of the WorksheetTable to find.

    Remarks

    Table names are compared case-insensitively.

  • indexOf

    .indexOf( table:ig.excel.WorksheetTable );
    Return Type:
    number
    Return Type Description:
    The 0-based index of the specified WorksheetTable in the collection or -1 if the item is not in the collection.

    Gets the index of the specified WorksheetTable in the collection.

    • table
    • Type:ig.excel.WorksheetTable
    • The WorksheetTable to find in the collection.
  • item

    .item( index:number );
    Return Type:
    ig.excel.WorksheetTable
    Return Type Description:
    The WorksheetTable at the specified index.

    Gets the WorksheetTable at the specified index.

    • index
    • Type:number
    • The zero-based index of the WorksheetTable to get.

    Exceptions

    Exception Description
    ig.ArgumentOutOfRangeException index is less than zero or index is greater than or equal to WorksheetTableCollection.count.
  • item

    .item( name:string );
    Return Type:
    ig.excel.WorksheetTable
    Return Type Description:
    The WorksheetTable with the specified name.

    Gets the WorksheetTable with the specified name.

    • name
    • Type:string
    • The name of the WorksheetTable to get.

    Exceptions

    Exception Description
    ig.InvalidOperationException A WorksheetTable with the specified name does not exist in the collection.

    Remarks

    Worksheet names are compared case-insensitively.

  • remove

    .remove( table:ig.excel.WorksheetTable, [convertToRange:boolean] );
    Return Type:
    boolean
    Return Type Description:
    True if the WorksheetTable was found and removed; False otherwise.

    Removes the WorksheetTable from the collection.

    • table
    • Type:ig.excel.WorksheetTable
    • The WorksheetTable to remove from the collection.
    • convertToRange
    • Type:boolean
    • Optional
    • True to apply the table style formatting to the cells
  • removeAt

    .removeAt( index:number, [convertToRange:boolean] );

    Removes the WorksheetTable at the specified index.

    • index
    • Type:number
    • The 0-based index of the WorksheetTable to remove.
    • convertToRange
    • Type:boolean
    • Optional
    • True to apply the table style formatting to the cells

    Exceptions

    Exception Description
    ig.ArgumentOutOfRangeException index is less than 0 or greater than or equal to WorksheetTableCollection.count.

Copyright © 1996 - 2024 Infragistics, Inc. All rights reserved.