Represents a column in a Microsoft Excel worksheet.
Constructors
Section titled "Constructors"WorksheetColumn
new WorksheetColumn(a: Worksheet, b: number): WorksheetColumn Returns WorksheetColumn
Properties
Section titled "Properties"$t: Type Accessors
Section titled "Accessors"cellFormat
Section titled "cellFormat"Inherited from: RowColumnBase
Gets the default cell format for cells in this row or column.
get cellFormat(): IWorksheetCellFormat
Returns IWorksheetCellFormat
hidden
Section titled "hidden"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
index
Section titled "index"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
outlineLevel
Section titled "outlineLevel"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
width
Section titled "width"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
worksheet
Section titled "worksheet"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
Methods
Section titled "Methods"autoFitWidth
Section titled "autoFitWidth"Sets the [[width]] to the extent required to display the contents of this column.
autoFitWidth(): void Returns void
calculateAutoFitWidth
Section titled "calculateAutoFitWidth"Returns the width required for the column to display all of its contents.
calculateAutoFitWidth(): number Returns number
getResolvedCellFormat
Section titled "getResolvedCellFormat"Inherited from: RowColumnBase
Gets the resolved cell formatting for the cells in the row or column.
getResolvedCellFormat(): IWorksheetCellFormat Returns IWorksheetCellFormat
getWidth
Section titled "getWidth"Gets the column width in the specified units, or NaN if the column has the default width.
getWidth(units: WorksheetColumnWidthUnit): number Parameters
- units:
WorksheetColumnWidthUnitThe units in which the width should be returned.
Returns number
setWidth
Section titled "setWidth"Sets the column width in the specified units.
setWidth(value: number, units: WorksheetColumnWidthUnit): void Parameters
- value:
numberThe width to set on the column, expressed in the specified 'units'.
- units:
WorksheetColumnWidthUnitThe units in which the 'value' is expressed.