Represents a column in a Microsoft Excel worksheet.
Inheritance
object
Properties
Section titled "Properties"CellFormat
Section titled "CellFormat"Inherited from: RowColumnBase
Gets the default cell format for cells in this row or column.
public IWorksheetCellFormat CellFormat { get; } Hidden
Section titled "Hidden"Inherited from: RowColumnBase
Gets or sets the value indicating whether the row or column is hidden.
public bool Hidden { get; set; } OutlineLevel
Section titled "OutlineLevel"Inherited from: RowColumnBase
Gets or sets the outline level for the row or column.
public int OutlineLevel { get; set; } Worksheet
Section titled "Worksheet"Inherited from: RowColumnBase
Gets the worksheet to which the row or column belongs.
public Worksheet Worksheet { get; } Index
Section titled "Index"Gets the 0-based index of the column in the worksheet.
public override int Index { get; } 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.
public int Width { get; set; } Methods
Section titled "Methods"GetResolvedCellFormat()
Section titled "GetResolvedCellFormat()"Inherited from: RowColumnBase
Gets the resolved cell formatting for the cells in the row or column.
public IWorksheetCellFormat GetResolvedCellFormat() Returns any
AutoFitWidth()
Section titled "AutoFitWidth()"Sets the to the extent required to display the contents of this column.
public void AutoFitWidth() Returns any
AutoFitWidth(int, int)
Section titled "AutoFitWidth(int, int)"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
CalculateAutoFitWidth()
Section titled "CalculateAutoFitWidth()"Returns the width required for the column to display all of its contents.
public int CalculateAutoFitWidth() Returns any
CalculateAutoFitWidth(int, int)
Section titled "CalculateAutoFitWidth(int, int)"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
GetWidth(WorksheetColumnWidthUnit)
Section titled "GetWidth(WorksheetColumnWidthUnit)"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