Interface IXLColumn
public interface IXLColumn : IXLRangeBase, IXLAddressable
- Inherited Members
- Extension Methods
Properties
IsHidden
Gets a value indicating whether this column is hidden or not.
bool IsHidden { get; }
Property Value
- bool
trueif this column is hidden; otherwise,false.
OutlineLevel
Gets or sets the outline level of this column.
int OutlineLevel { get; set; }
Property Value
- int
The outline level of this column.
Width
Gets or sets the width of this column in number of characters (NoC).
double Width { get; set; }
Property Value
Remarks
NoC are a non-linear units displayed as a column width in Excel, next to pixels. NoC combined with default font of the workbook can express width of the column in pixels and other units.
Methods
AddVerticalPageBreak()
Adds a vertical page break after this column.
IXLColumn AddVerticalPageBreak()
Returns
AdjustToContents()
Adjusts the width of the column based on its contents.
IXLColumn AdjustToContents()
Returns
AdjustToContents(double, double)
IXLColumn AdjustToContents(double minWidth, double maxWidth)
Parameters
Returns
AdjustToContents(int)
Adjusts the width of the column based on its contents, starting from the startRow.
IXLColumn AdjustToContents(int startRow)
Parameters
startRowintThe row to start calculating the column width.
Returns
AdjustToContents(int, double, double)
IXLColumn AdjustToContents(int startRow, double minWidth, double maxWidth)
Parameters
Returns
AdjustToContents(int, int)
Adjusts the width of the column based on its contents, starting from the startRow and ending at endRow.
IXLColumn AdjustToContents(int startRow, int endRow)
Parameters
startRowintThe row to start calculating the column width.
endRowintThe row to end calculating the column width.
Returns
AdjustToContents(int, int, double, double)
Adjust width of the column according to the content of the cells.
IXLColumn AdjustToContents(int startRow, int endRow, double minWidth, double maxWidth)
Parameters
startRowintNumber of a first row whose content is considered.
endRowintNumber of a last row whose content is considered.
minWidthdoubleMinimum width of adjusted column, in NoC.
maxWidthdoubleMaximum width of adjusted column, in NoC.
Returns
Cell(int)
Gets the cell in the specified row.
IXLCell Cell(int rowNumber)
Parameters
rowNumberintThe cell's row.
Returns
CellCount()
int CellCount()
Returns
Cells(int, int)
Returns the specified group of cells.
IXLCells Cells(int firstRow, int lastRow)
Parameters
firstRowintThe first row in the group of cells to return.
lastRowintThe last row in the group of cells to return.
Returns
Cells(string)
Returns the specified group of cells, separated by commas.
e.g. Cells("1"), Cells("1:5"), Cells("1,3:5")
IXLCells Cells(string cellsInColumn)
Parameters
cellsInColumnstringThe column cells to return.
Returns
Clear(XLClearOptions)
Clears the contents of this column.
IXLColumn Clear(XLClearOptions clearOptions = XLClearOptions.All)
Parameters
clearOptionsXLClearOptionsSpecify what you want to clear.
Returns
Collapse()
Show this column as collapsed.
IXLColumn Collapse()
Returns
Column(IXLCell, IXLCell)
IXLRangeColumn Column(IXLCell start, IXLCell end)
Parameters
Returns
Column(int, int)
IXLRangeColumn Column(int start, int end)
Parameters
Returns
ColumnLeft()
IXLColumn ColumnLeft()
Returns
ColumnLeft(int)
IXLColumn ColumnLeft(int step)
Parameters
stepint
Returns
ColumnLetter()
Gets this column's letter
string ColumnLetter()
Returns
ColumnNumber()
Gets this column's number
int ColumnNumber()
Returns
ColumnRight()
IXLColumn ColumnRight()
Returns
ColumnRight(int)
IXLColumn ColumnRight(int step)
Parameters
stepint
Returns
ColumnUsed(XLCellsUsedOptions)
IXLRangeColumn ColumnUsed(XLCellsUsedOptions options = XLCellsUsedOptions.AllContents)
Parameters
optionsXLCellsUsedOptions
Returns
Columns(string)
IXLRangeColumns Columns(string columns)
Parameters
columnsstring
Returns
CopyTo(IXLCell)
IXLRangeColumn CopyTo(IXLCell cell)
Parameters
cellIXLCell
Returns
CopyTo(IXLColumn)
IXLColumn CopyTo(IXLColumn column)
Parameters
columnIXLColumn
Returns
CopyTo(IXLRangeBase)
IXLRangeColumn CopyTo(IXLRangeBase range)
Parameters
rangeIXLRangeBase
Returns
Delete()
Deletes this column and shifts the columns at the right of this one accordingly.
void Delete()
Remarks
Don't use in a loop due to poor performance. Use Delete(XLShiftDeletedCells) instead.
Expand()
Expands this column (if it's collapsed).
IXLColumn Expand()
Returns
Group()
Adds this column to the next outline level (Increments the outline level for this column by 1).
IXLColumn Group()
Returns
Group(bool)
Adds this column to the next outline level (Increments the outline level for this column by 1).
IXLColumn Group(bool collapse)
Parameters
collapseboolIf set to
truethe column will be shown collapsed.
Returns
Group(int)
Sets outline level for this column.
IXLColumn Group(int outlineLevel)
Parameters
outlineLevelintThe outline level.
Returns
Group(int, bool)
Sets outline level for this column.
IXLColumn Group(int outlineLevel, bool collapse)
Parameters
outlineLevelintThe outline level.
collapseboolIf set to
truethe column will be shown collapsed.
Returns
Hide()
Hides this column.
IXLColumn Hide()
Returns
InsertColumnsAfter(int)
Inserts X number of columns at the right of this one.
All columns at the right will be shifted accordingly.
IXLColumns InsertColumnsAfter(int numberOfColumns)
Parameters
numberOfColumnsintThe number of columns to insert.
Returns
InsertColumnsBefore(int)
Inserts X number of columns at the left of this one.
This column and all at the right will be shifted accordingly.
IXLColumns InsertColumnsBefore(int numberOfColumns)
Parameters
numberOfColumnsintThe number of columns to insert.
Returns
Sort(XLSortOrder, bool, bool)
IXLColumn Sort(XLSortOrder sortOrder = XLSortOrder.Ascending, bool matchCase = false, bool ignoreBlanks = true)
Parameters
sortOrderXLSortOrdermatchCaseboolignoreBlanksbool
Returns
Ungroup()
Adds this column to the previous outline level (decrements the outline level for this column by 1).
IXLColumn Ungroup()
Returns
Ungroup(bool)
Adds this column to the previous outline level (decrements the outline level for this column by 1).
IXLColumn Ungroup(bool fromAll)
Parameters
fromAllboolIf set to
trueit will remove this column from all outline levels.
Returns
Unhide()
Unhides this column.
IXLColumn Unhide()