ig.excel.WorksheetColumn

Represents a column in a Microsoft Excel worksheet.

Dependencies

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

    .autoFitWidth( );

    Sets the WorksheetColumn.width to the extent required to display the contents of this column.

    Exceptions

    Exception Description
    ig.InvalidOperationException The column is not associated with a Worksheet such as when the column has been deleted or the Worksheet is not associated with a Workbook such as when the Worksheet has been deleted.
  • autoFitWidth

    .autoFitWidth( startRowIndex:number, endRowIndex:number );

    Sets the width to the extent required to display all of the contents for the specified range of rows.

    • startRowIndex
    • Type:number
    • A 0-based index of the first row whose contents are to be calculated
    • endRowIndex
    • Type:number
    • A 0-based index of the last row whose contents are to be calculated

    Exceptions

    Exception Description
    ig.InvalidOperationException The column is not associated with a Worksheet such as when the column has been deleted or the Worksheet is not associated with a Workbook such as when the Worksheet has been deleted.
    ig.ArgumentOutOfRangeException The startRowIndex must be greater than or equal to 0, less than or equal to the endRowIndex and less than or equal to the Count of the Rows in the Worksheet. Similarly the endRowIndex must be greater than or equal to the startRowIndex and less than the WorksheetRowCollection.maxCount of the Worksheet's Worksheet.rows collection which depends upon the Workbook.currentFormat
  • calculateAutoFitWidth

    .calculateAutoFitWidth( );
    Return Type:
    number
    Return Type Description:
    The width needed for the column to display all of its contents. The value is the same units as used for the WorksheetColumn.width property.

    Returns the width required for the column to display all of its contents.

    Exceptions

    Exception Description
    ig.InvalidOperationException The column is not associated with a Worksheet such as when the column has been deleted or the Worksheet is not associated with a Workbook such as when the Worksheet has been deleted.
  • calculateAutoFitWidth

    .calculateAutoFitWidth( startRowIndex:number, endRowIndex:number );
    Return Type:
    number
    Return Type Description:
    The width needed for the column to display the contents of the rows in the specified range. The value is the same units as used for the WorksheetColumn.width property.

    Returns the width required for the column to display all of the contents for the specified range of rows.

    • startRowIndex
    • Type:number
    • A 0-based index of the first row whose contents are to be calculated
    • endRowIndex
    • Type:number
    • A 0-based index of the last row whose contents are to be calculated

    Exceptions

    Exception Description
    ig.InvalidOperationException The column is not associated with a Worksheet such as when the column has been deleted or the Worksheet is not associated with a Workbook such as when the Worksheet has been deleted.
    ig.ArgumentOutOfRangeException The startRowIndex must be greater than or equal to 0, less than or equal to the endRowIndex and less than or equal to the Count of the Rows in the Worksheet. Similarly the endRowIndex must be greater than or equal to the startRowIndex and less than the WorksheetRowCollection.maxCount of the Worksheet's Worksheet.rows collection which depends upon the Workbook.currentFormat
  • getWidth

    .getWidth( units:ig.excel.WorksheetColumnWidthUnit );
    Return Type:
    number
    Return Type Description:
    The column width in the specified units, or NaN if the column has the default width.

    Gets the column width in the specified units, or NaN if the column has the default width.

    • units
    • Type:ig.excel.WorksheetColumnWidthUnit
    • The units in which the width should be returned.

    Exceptions

    Exception Description
    ig.excel.InvalidEnumArgumentException units is not defined in the WorksheetColumnWidthUnit enumeration.

    Remarks

    If units is Character256th, the value returned will be the same as the value of the WorksheetColumn.width property, with one exception: if the column has the default width, this method will return NaN and Width will return -1.

  • index

    .index( );
    Return Type:
    number
    Return Type Description:
    The 0-based index of the column in the worksheet.

    Gets the 0-based index of the column in the worksheet.

  • setWidth

    .setWidth( value:number, units:ig.excel.WorksheetColumnWidthUnit );

    Sets the column width in the specified units.

    • value
    • Type:number
    • The width to set on the column, expressed in the specified units.
    • units
    • Type:ig.excel.WorksheetColumnWidthUnit
    • The units in which the value is expressed.

    Exceptions

    Exception Description
    ig.ArgumentException value is infinity.
    ig.excel.InvalidEnumArgumentException units is not defined in the WorksheetColumnWidthUnit enumeration.
    ig.InvalidOperationException If the column was removed from the worksheet.

    Remarks

    Setting a value of NaN will reset the column width so that the column uses the default column width of the worksheet.

  • width

    .width( );
    Return Type:
    number
    Return Type Description:
    The column width including padding, in 256ths of the '0' digit character width in the workbook's default font.

    Gets the column width including padding, in 256ths of the '0' digit character width in the workbook's default font.

    Exceptions

    Exception Description
    ig.InvalidOperationException From the setter if the column was removed from the worksheet.

    Remarks

    If the width of the column is less than zero, the Worksheet.defaultColumnWidth of the owning worksheet will be used as the column's width.

    The value assigned must be between -1 and 65535. Invalid values will be automatically adjusted to valid values.

    Setting or getting this property is equivalent to calling WorksheetColumn.setWidth or WorksheetColumn.getWidth using the WorksheetColumnWidthUnit value of Character256th.

  • width

    .width( value:number );
    Return Type:
    number
    Return Type Description:
    The column width including padding, in 256ths of the '0' digit character width in the workbook's default font.

    Sets the column width including padding, in 256ths of the '0' digit character width in the workbook's default font.

    • value
    • Type:number

    Exceptions

    Exception Description
    ig.InvalidOperationException From the setter if the column was removed from the worksheet.

    Remarks

    If the width of the column is less than zero, the Worksheet.defaultColumnWidth of the owning worksheet will be used as the column's width.

    The value assigned must be between -1 and 65535. Invalid values will be automatically adjusted to valid values.

    Setting or getting this property is equivalent to calling WorksheetColumn.setWidth or WorksheetColumn.getWidth using the WorksheetColumnWidthUnit value of Character256th.

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