Class ColumnSettings
- Namespace
- SheetStream
- Assembly
- SheetStream.dll
Width, visibility and default style of one worksheet column. Obtain through Column(int); settings must be made before the sheet's first row is written.
public sealed class ColumnSettings
- Inheritance
-
ColumnSettings
- Inherited Members
Properties
Index
1-based column index.
public int Index { get; }
Property Value
IsHidden
True when the column is hidden.
public bool IsHidden { get; }
Property Value
OutlineLevel
Outline (grouping) level, 0 to 7. Grouped columns can be collapsed with Excel's outline buttons.
public int OutlineLevel { get; }
Property Value
Style
Default style for cells of this column that are not written explicitly.
public CellStyle? Style { get; }
Property Value
Width
Width in Excel character units, or null for Excel's default (about 8.43).
public double? Width { get; }
Property Value
Methods
Hide()
Hides the column.
public ColumnSettings Hide()
Returns
SetOutlineLevel(int)
Puts the column in an outline group of the given level (1 to 7; 0 removes it).
public ColumnSettings SetOutlineLevel(int level)
Parameters
levelint
Returns
SetStyle(CellStyle)
Applies a default style to the whole column (cells written with their own style keep theirs).
public ColumnSettings SetStyle(CellStyle style)
Parameters
styleCellStyle
Returns
SetWidth(double)
Sets the column width in Excel character units (the number shown when dragging a column edge in Excel). Excel accepts 0 to 255.
public ColumnSettings SetWidth(double width)
Parameters
widthdouble