Represents a column in a Microsoft Excel worksheet.

Inheritance

Inherited from: RowColumnBase

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

public IWorksheetCellFormat CellFormat { get; }

Inherited from: RowColumnBase

Gets or sets the value indicating whether the row or column is hidden.

public bool Hidden { get; set; }

Inherited from: RowColumnBase

Gets or sets the outline level for the row or column.

public int OutlineLevel { get; set; }

Inherited from: RowColumnBase

Gets the worksheet to which the row or column belongs.

public Worksheet Worksheet { get; }

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

public override int Index { get; }

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

public int Width { get; set; }

Inherited from: RowColumnBase

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

public IWorksheetCellFormat GetResolvedCellFormat()

Returns any

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

public void AutoFitWidth()

Returns any

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

public void AutoFitWidth(int startRowIndex, int endRowIndex)

Parameters

  • startRowIndex: int
  • endRowIndex: int

Returns any

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

public int CalculateAutoFitWidth()

Returns any

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

public int CalculateAutoFitWidth(int startRowIndex, int endRowIndex)

Parameters

  • startRowIndex: int
  • endRowIndex: int

Returns any

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

public double GetWidth(WorksheetColumnWidthUnit units)

Parameters

  • units: WorksheetColumnWidthUnit

Returns any

SetWidth(double, WorksheetColumnWidthUnit)

Section titled "SetWidth(double, WorksheetColumnWidthUnit)"

Sets the column width in the specified units.

public void SetWidth(double value, WorksheetColumnWidthUnit units)

Parameters

  • value: double
  • units: WorksheetColumnWidthUnit

Returns any