Represents a column in a Microsoft Excel worksheet.

WorksheetColumn

new WorksheetColumn(a: Worksheet, b: number): WorksheetColumn

Returns WorksheetColumn

$t: Type

Inherited from: RowColumnBase

hidden: boolean

Inherited from: RowColumnBase

outlineLevel: number
width: number

Inherited from: RowColumnBase

Gets the default cell format for cells in this row or column.

get cellFormat(): IWorksheetCellFormat

Returns IWorksheetCellFormat

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

get index(): number

Returns number

Inherited from: RowColumnBase

Gets the worksheet to which the row or column belongs. The worksheet to which the row or column belongs.

get worksheet(): Worksheet

Returns Worksheet

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

autoFitWidth(): void

Returns void

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

calculateAutoFitWidth(): number

Returns number

Inherited from: RowColumnBase

Gets the resolved cell formatting for the cells in the row or column.

getResolvedCellFormat(): IWorksheetCellFormat

Returns IWorksheetCellFormat

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

getWidth(units: WorksheetColumnWidthUnit): number

Parameters

Returns number

Sets the column width in the specified units.

setWidth(value: number, units: WorksheetColumnWidthUnit): void

Parameters

  • value: number

    The width to set on the column, expressed in the specified 'units'.

  • units: WorksheetColumnWidthUnit

    The units in which the 'value' is expressed.

Returns void