Search Results for

    Show / Hide Table of Contents

    Class RangeColumn

    A class that represents a single column of cells.

    Inheritance
    System.Object
    Range
    RangeColumn
    Implements
    System.Collections.Generic.IEnumerable<Cell>
    System.Collections.IEnumerable
    Inherited Members
    Range.GetEnumerator()
    Range.Sum()
    Range.Max()
    Range.Min()
    Range.Avg()
    Range.SortAscending()
    Range.SortDescending()
    Range.SortByColumn(String, SortOrder)
    Range.SortByColumn(Int32, SortOrder)
    Range.Trim()
    Range.ToDataTable(Boolean)
    Range.SetCellValue(Int32, Int32, Object)
    Range.GetValue<TType>()
    Range.TryGetValue<TType>(TType)
    Range.ToString()
    Range.ClearContents()
    Range.Copy(WorkSheet, String)
    Range.Replace(String, String)
    Range.SaveAsNamedTable(String, Boolean, TableStyle)
    Range.SaveAsNamedRange(String, Boolean)
    Range.GetAllRows()
    Range.GetAllPhysicalRows()
    Range.GetRows(Boolean)
    Range.GetAllColumns()
    Range.GetAllPhysicalColumns()
    Range.GetColumns(Boolean)
    Range.Row(Int32)
    Range.Column(Int32)
    Range.RangeAddressAsString
    Range.IsEmpty
    Range.Value
    Range.FormatString
    Range.Formula
    Range.Rows
    Range.AllRowsInRange
    Range.Columns
    Range.AllColumnsInRange
    Range.Style
    Range.WorkBook
    Range.DateTimeValue
    Range.StringValue
    Range.BoolValue
    Range.IntValue
    Range.DoubleValue
    Range.DecimalValue
    Range.FloatValue
    Range.Int64Value
    Range.LongValue
    Range.Int32Value
    Namespace: IronXL
    Assembly: IronXL.dll
    Syntax
    public class RangeColumn : Range, IEnumerable<Cell>, IEnumerable

    Properties

    Hidden

    Gets or sets a value indicating whether this column is hidden.

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

    RangeAddress

    Address of the column.

    Declaration
    public RangeAddress RangeAddress { get; }
    Property Value
    Type Description
    RangeAddress

    Width

    Gets or sets the width of the column.

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

    Methods

    AddRange(Range)

    Add range to the current column if they can be combined.

    Declaration
    public override Range AddRange(Range range)
    Parameters
    Type Name Description
    Range range

    The range to add to the current working range.

    Returns
    Type Description
    Range

    This Range allowing a fluent coding style.

    Overrides
    Range.AddRange(Range)
    Exceptions
    Type Condition
    System.InvalidOperationException

    This range cannot be added to the current column because they are not on the same line or cannot be combined in one column

    AutoSizeColumn()

    Changes width of the column to fit the content. NOTE: This method measures the text in the cell based on the font that is used for the cell. If the exact font is not found on the machine it will try to measure it with a defalt font. If the default could not be found, it will try to use any font available. Finally if there are no fonts found the exception will be thrown.

    Declaration
    public void AutoSizeColumn()
    Exceptions
    Type Condition
    System.ArgumentException
    FontException

    Trown when no fonts found istalled on the machine.

    AutoSizeColumn(Boolean)

    Changes width of the column to fit the content. NOTE: This method measures the text in the cell based on the font that is used for the cell. If the exact font is not found on the machine it will try to measure it with a defalt font. If the default could not be found, it will try to use any font available. Finally if there are no fonts found the exception will be thrown.

    Declaration
    public void AutoSizeColumn(bool useMergedCells)
    Parameters
    Type Name Description
    System.Boolean useMergedCells

    If true, the width of merged cells will be taken into account.

    Exceptions
    Type Condition
    System.ArgumentException
    FontException

    Trown when no fonts found istalled on the machine.

    SubtractRange(Range)

    Subtract range from the current column if it can be subtracted.

    Declaration
    public override Range SubtractRange(Range range)
    Parameters
    Type Name Description
    Range range

    The range to remove from the current working range.

    Returns
    Type Description
    Range

    This Range allowing a fluent coding style.

    Overrides
    Range.SubtractRange(Range)
    Exceptions
    Type Condition
    System.InvalidOperationException

    This range cannot be subtracted from the current column because result column isn't continuous

    Implements

    System.Collections.Generic.IEnumerable<>
    System.Collections.IEnumerable

    Inherited members

    GetEnumerator()
    Sum()
    Max()
    Min()
    Avg()
    SortAscending()
    SortDescending()
    SortByColumn(String, SortOrder)
    SortByColumn(Int32, SortOrder)
    Trim()
    ToDataTable(Boolean)
    SetCellValue(Int32, Int32, Object)
    GetValue<TType>()
    TryGetValue<TType>(TType)
    ToString()
    ClearContents()
    Copy(WorkSheet, String)
    Replace(String, String)
    SaveAsNamedTable(String, Boolean, TableStyle)
    SaveAsNamedRange(String, Boolean)
    GetAllRows()
    GetAllPhysicalRows()
    GetRows(Boolean)
    GetAllColumns()
    GetAllPhysicalColumns()
    GetColumns(Boolean)
    Row(Int32)
    Column(Int32)
    RangeAddressAsString
    IsEmpty
    Value
    FormatString
    Formula
    Rows
    AllRowsInRange
    Columns
    AllColumnsInRange
    Style
    WorkBook
    DateTimeValue
    StringValue
    BoolValue
    IntValue
    DoubleValue
    DecimalValue
    FloatValue
    Int64Value
    LongValue
    Int32Value
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Free 30-Day Trial Key
    In This Article
    Back to top
    Install with Nuget
    Want to deploy IronXL to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronXL free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.