ig.excel.WorksheetRegion

Represents a rectangular region of cells on a worksheet.

Dependencies

jquery-1.4.4.js
infragistics.util.js
infragistics.ext_collections.js
infragistics.ext_collectionsExtended.js
infragistics.ext_io.js
infragistics.ext_text.js
infragistics.ext_core.js
infragistics.documents.core_core.js
infragistics.ext_ui.js
The current widget has no options.
The current widget has no events.
  • ig.excel.WorksheetRegion
    Constructor

    new $.ig.excel.WorksheetRegion( worksheet:ig.excel.Worksheet, firstRow:number, firstColumn:number, lastRow:number, lastColumn:number );

    Initializes a new instance of the WorksheetRegion class.

    • worksheet
    • Type:ig.excel.Worksheet
    • The worksheet on which the region resides.
    • firstRow
    • Type:number
    • The index of the first row of the region.
    • firstColumn
    • Type:number
    • The index of the first column of the region.
    • lastRow
    • Type:number
    • The index of the last row of the region.
    • lastColumn
    • Type:number
    • The index of the last row column of the region.

    Exceptions

    Exception Description
    ig.ArgumentNullException worksheet is null.
    ig.InvalidOperationException firstRow is greater than lastRow or firstColumn is greater than lastColumn.
    ig.ArgumentOutOfRangeException Any row or column indices specified are outside the valid row or column ranges.
  • applyArrayFormula

    .applyArrayFormula( value:string );

    Applies a array formula to the region of cells.

    • value
    • Type:string
    • The array formula to parse and apply to the region.

    Exceptions

    Exception Description
    ig.ArgumentNullException value is null or empty.
    ig.excel.FormulaParseException value is not a valid formula.
    ig.InvalidOperationException The region contains another array formula or data table which extends outside the region.

    Remarks

    value is parsed based on the CellReferenceMode of the Workbook to which the region belongs. If the region's WorksheetRegion.worksheet has been removed from its parent collection, the A1 CellReferenceMode will be used to parse the formula.

  • applyFormula

    .applyFormula( value:string );

    Applies a formula to the region of cells.

    • value
    • Type:string
    • The formula to parse and apply to the region.

    Exceptions

    Exception Description
    ig.ArgumentNullException value is null or empty.
    ig.excel.FormulaParseException value is not a valid formula.
    ig.InvalidOperationException The region contains an array formula or data table which extends outside the region.

    Remarks

    value is parsed based on the CellReferenceMode of the Workbook to which the region belongs. If the region's WorksheetRegion.worksheet has been removed from its parent collection, the A1 CellReferenceMode will be used to parse the formula.

    See Also

  • equals

    .equals( obj:object );

    Determines whether the specified value equals this WorksheetRegion.

    • obj
    • Type:object
    • The value to test for equality.
  • firstColumn

    .firstColumn( );
    Return Type:
    number
    Return Type Description:
    The index of the first column in the region.

    Gets the index of the first column in the region.

  • firstRow

    .firstRow( );
    Return Type:
    number
    Return Type Description:
    The index of the first row in the region.

    Gets the index of the first row in the region.

  • formatAsTable

    .formatAsTable( tableHasHeaders:boolean );
    Return Type:
    ig.excel.WorksheetTable
    Return Type Description:
    The WorksheetTable created the represent the formatted table for the region.

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

    • tableHasHeaders
    • Type:boolean
    • A value which indicates whether the top row of the region contains the headers for the table.

    Exceptions

    Exception Description
    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.

    Remarks

    When the table is created, the Workbook.defaultTableStyle 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.

  • formatAsTable

    .formatAsTable( 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 the region as a table and adds an associated WorksheetTable to the Worksheet.tables collection.

    • 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
    • The WorksheetTableStyle to apply to the table or null to use the Workbook.defaultTableStyle.

    Exceptions

    Exception Description
    ig.ArgumentException The specified tableStyle does not exist in the Workbook.customTableStyles or Workbook.standardTableStyles collections.
    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.

    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.

  • getBoundsInTwips

    .getBoundsInTwips( );
    Return Type:
    object
    Return Type Description:
    The bounds of the region on its worksheet. This will be an object with numeric values for properties 'x', 'y', 'width', 'height', 'left', 'top', 'right', and 'bottom'.

    Gets the bounds of the region in twips (1/20th of a point).

    Remarks

    The bounds returned by this method are only valid with the current configuration of the worksheet. If any rows or columns before the region are resized, these bounds will no longer reflect the position of the region.

  • getBoundsInTwips

    .getBoundsInTwips( options:ig.excel.PositioningOptions );
    Return Type:
    object
    Return Type Description:
    The bounds of the region on its worksheet. This will be an object with numeric values for properties 'x', 'y', 'width', 'height', 'left', 'top', 'right', and 'bottom'.

    Gets the bounds of the region in twips (1/20th of a point).

    • options
    • Type:ig.excel.PositioningOptions
    • The options to use when getting the bounds of the region.

    Remarks

    The bounds returned by this method are only valid with the current configuration of the worksheet. If any rows or columns before the region are resized, these bounds will no longer reflect the position of the region.

  • getHashCode

    .getHashCode( );

    Gtes the hash code for the WorksheetRegion.

  • lastColumn

    .lastColumn( );
    Return Type:
    number
    Return Type Description:
    The index of the last column in the region.

    Gets the index of the last column in the region.

  • lastRow

    .lastRow( );
    Return Type:
    number
    Return Type Description:
    The index of the last row in the region.

    Gets the index of the last row in the region.

  • toString

    .toString( );
    Return Type:
    string
    Return Type Description:
    The string representation of the range of cells in the region.

    Gets the string representation of the range of cells in the region.

  • toString

    .toString( cellReferenceMode:ig.excel.CellReferenceMode, includeWorksheetName:boolean );
    Return Type:
    string
    Return Type Description:
    The string representation of the range of cells in the region.

    Gets the string representation of the range of cells in the region.

    • cellReferenceMode
    • Type:ig.excel.CellReferenceMode
    • The mode used to generate cell references.
    • includeWorksheetName
    • Type:boolean
    • The value indicating whether to include the worksheet name in the range address.
  • toString

    .toString( cellReferenceMode:ig.excel.CellReferenceMode, includeWorksheetName:boolean, useRelativeColumn:boolean, useRelativeRow:boolean );
    Return Type:
    string
    Return Type Description:
    The string representation of the range of cells in the region.

    Gets the string representation of the range of cells in the region.

    • cellReferenceMode
    • Type:ig.excel.CellReferenceMode
    • The mode used to generate cell references.
    • includeWorksheetName
    • Type:boolean
    • The value indicating whether to include the worksheet name in the range address.
    • useRelativeColumn
    • Type:boolean
    • The value indicating whether to use a relative column address for the cells in the range.
    • useRelativeRow
    • Type:boolean
    • The value indicating whether to use a relative row address for the cells in the range.
  • worksheet

    .worksheet( );
    Return Type:
    ig.excel.Worksheet
    Return Type Description:
    The worksheet on which the region resides or null if the region has been shifted off the worksheet.

    Gets the worksheet on which the region resides.

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