Class ExcelColumn¶
Namespace: OfficeOpenXml
Assembly: EPPlus.dll
Represents one or more columns within the worksheet
Inheritance¶
Inherited Members¶
object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()
Constructors¶
ExcelColumn(ExcelWorksheet, int)¶
Creates a new instance of the ExcelColumn class.
For internal use only!
Parameters¶
Worksheet ExcelWorksheet
col int
Properties¶
BestFit¶
If set to true a column automaticlly resize(grow wider) when a user inputs numbers in a cell.
Property Value¶
Collapsed¶
If the column is collapsed in outline mode. Setting this property will not hide the children. Use the CollapseChildren(bool) or SetVisibleOutlineLevel(int, bool) methods to collapse and hide columns/rows via the Columns collection.
Property Value¶
ColumnMax¶
Sets the last column the definition refers to.
Property Value¶
ColumnMin¶
Sets the first column the definition refers to.
Property Value¶
Hidden¶
Defines if the column is visible or hidden
Property Value¶
Merged¶
Merges all cells of the column
Property Value¶
OutlineLevel¶
Outline level. Zero if no outline
Property Value¶
PageBreak¶
Adds a manual page break after the column.
Property Value¶
Phonetic¶
Phonetic
Property Value¶
Style¶
The Style applied to the whole column. Only effects cells with no individual style set. Use Range object if you want to set specific styles.
Property Value¶
StyleID¶
Sets the style for the entire column using the style ID.
Property Value¶
StyleName¶
Sets the style for the entire column using a style name.
Property Value¶
Width¶
Sets the width of the column in the worksheet
Property Value¶
Methods¶
AutoFit()¶
Set the column width from the content of the range. The minimum width is the value of the ExcelWorksheet.defaultColumnWidth property. Note: Cells containing formulas are ignored unless a calculation is performed. Wrapped and merged cells are also ignored.
AutoFit(double)¶
Set the column width from the content. Note: Cells containing formulas are ignored unless a calculation is performed. Wrapped and merged cells are also ignored.
Parameters¶
MinimumWidth double
Minimum column width
AutoFit(double, double)¶
Set the column width from the content. Note: Cells containing formulas are ignored unless a calculation is performed. Wrapped and merged cells are also ignored.
Parameters¶
MinimumWidth double
Minimum column width
MaximumWidth double
Maximum column width
ToString()¶
Returns the range of columns covered by the column definition.
Returns¶
A string describing the range of columns covered by the column definition.