Table of Contents

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

int

IsHidden

True when the column is hidden.

public bool IsHidden { get; }

Property Value

bool

OutlineLevel

Outline (grouping) level, 0 to 7. Grouped columns can be collapsed with Excel's outline buttons.

public int OutlineLevel { get; }

Property Value

int

Style

Default style for cells of this column that are not written explicitly.

public CellStyle? Style { get; }

Property Value

CellStyle

Width

Width in Excel character units, or null for Excel's default (about 8.43).

public double? Width { get; }

Property Value

double?

Methods

Hide()

Hides the column.

public ColumnSettings Hide()

Returns

ColumnSettings

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

level int

Returns

ColumnSettings

SetStyle(CellStyle)

Applies a default style to the whole column (cells written with their own style keep theirs).

public ColumnSettings SetStyle(CellStyle style)

Parameters

style CellStyle

Returns

ColumnSettings

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

width double

Returns

ColumnSettings