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 hidden
Section titled "hidden"Inherited from: RowColumnBase
hidden: boolean outlineLevel
Section titled "outlineLevel"Inherited from: RowColumnBase
outlineLevel: number width
Section titled "width"width: number 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
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
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.