Show / Hide Table of Contents

Class Column

Inheritance
System.Object
AbstractFormattable
Column
Inherited Members
AbstractFormattable.Alignment
AbstractFormattable.Fill
AbstractFormattable.Font
AbstractFormattable.Format
AbstractFormattable.IsLocked
AbstractFormattable.IsFormulaHidden
AbstractFormattable.Borders
AbstractFormattable.Style
AbstractFormattable.Worksheet
Namespace: DRIT.Spreadsheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public class Column : AbstractFormattable

Fields

MaximumCharacterWidth

Declaration
public const double MaximumCharacterWidth = null
Field Value
Type Description
System.Double

Properties

Address

Declaration
public CellAddress Address { get; }
Property Value
Type Description
CellAddress

CustomWidthCharacters

Gets the custom width set for the column in characters with five pixels padding.

Declaration
public double? CustomWidthCharacters { get; }
Property Value
Type Description
System.Nullable<System.Double>
Remarks

In OpenXml the additional 5 pixels padding is also stored. If the width is not explicitly set, return the default width for the worksheet.

CustomWidthSet

Gets whether custom width is set for column.

Declaration
public bool CustomWidthSet { get; }
Property Value
Type Description
System.Boolean

Index

Declaration
public int Index { get; }
Property Value
Type Description
System.Int32

IsCollapsed

Gets or sets whether the column is collapsed.

Declaration
public bool IsCollapsed { get; set; }
Property Value
Type Description
System.Boolean

IsHidden

Gets or sets whether the column is hidden.

Declaration
public bool IsHidden { get; set; }
Property Value
Type Description
System.Boolean

Label

Declaration
public string Label { get; }
Property Value
Type Description
System.String

OutlineLevel

Gets or sets the outline level of the row/ group.

Declaration
public int OutlineLevel { get; set; }
Property Value
Type Description
System.Int32

WidthCharacters

Gets or sets the column width in characters without five pixels padding.

Declaration
public double WidthCharacters { get; set; }
Property Value
Type Description
System.Double
Remarks

If this value is not set it return the default character width of the worksheet.

WidthPixels

Gets or sets the width of the column in pixels with five pixels padding.

Declaration
public double WidthPixels { get; set; }
Property Value
Type Description
System.Double

Methods

Add(Cell)

Declaration
public void Add(Cell cell)
Parameters
Type Name Description
Cell cell

Autofit()

Adjust the width of the column so that it fits its content.

Declaration
public void Autofit()

Remove(Cell)

Declaration
public void Remove(Cell cell)
Parameters
Type Name Description
Cell cell

SetDefaultWidth()

Sets the column to the default width for the worksheet.

Declaration
public void SetDefaultWidth()

Operators

Addition(Column, Int32)

Declaration
public static Column operator +(Column This, int offset)
Parameters
Type Name Description
Column This
System.Int32 offset
Returns
Type Description
Column
Back to top Generated by DocFX