Represents a column in a Microsoft Excel worksheet.

WorksheetColumn

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

Returns WorksheetColumn

Inherited from: RowColumnBase

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

get cellFormat(): IWorksheetCellFormat

Returns IWorksheetCellFormat

Inherited from: RowColumnBase

Gets or sets the value indicating whether the row or column is hidden. The Hidden state also controls the expanded state of rows or columns in outline groups. Basically, an outline group simply provides an easy way to hide and unhide all rows or columns in the group at the same time, via the expansion indicator. The value indicating whether the row or column is hidden.

get hidden(): boolean

Returns boolean

set hidden(a: boolean): void

Parameters

  • a: boolean

Returns void

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 or sets the outline level for the row or column.

get outlineLevel(): number

Returns number

set outlineLevel(a: number): void

Parameters

  • a: number

Returns void

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

get width(): number

Returns number

set width(a: number): void

Parameters

  • a: number

Returns void

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