Search Results for

    Show / Hide Table of Contents

    ExcelFile.GetColWidth Method

    Overloads

    • ExcelFile.GetColWidth(Int32)
    • ExcelFile.GetColWidth(Int32, Boolean)
    • ExcelFile.GetColWidth(Int32, Int32, Boolean)

    ExcelFile.GetColWidth(Int32)

    Returns the current Column width, in Excel internal units. (Character width of "font 0" / 256) See Excel Internal Units for more information in Excel internal units.

    Remarks

    Use ExcelMetrics.ColMult to convert the internal units to pixels.

    Syntax

    Namespace: FlexCel.Core

    public abstract Int32 GetColWidth(Int32 col)

    Parameters

    <-> Parameter Type Description
    col Int32 Column Index (1 based)

    Returns

    Column width in internal excel units.(Character width of "font 0" / 256)

    Examples

        double ColWidthInPixels = xls.GetColWidth(Col) / ExcelMetrics.ColMult(xls);
    

    See also

    • ExcelFile

    ExcelFile.GetColWidth(Int32, Boolean)

    Returns the current Column width, in Excel internal units. (Character width of font 0 / 256) See Excel Internal Units for more information in Excel internal units.

    Remarks

    Use ExcelMetrics.ColMult to convert the internal units to pixels.

    Syntax

    Namespace: FlexCel.Core

    public abstract Int32 GetColWidth(Int32 col, Boolean HiddenIsZero)

    Parameters

    <-> Parameter Type Description
    col Int32 Column Index (1 based)
    HiddenIsZero Boolean If true, the width returned for a hidden column will be 0 and not its real width.

    Returns

    Column width in internal excel units.(Character width of font 0 / 256)

    Examples

        double ColWidthInPixels = xls.GetColWidth(Col) / ExcelMetrics.ColMult(xls);
    

    See also

    • ExcelFile

    ExcelFile.GetColWidth(Int32, Int32, Boolean)

    Returns the current Column width for a given sheet, in Excel internal units. (Character width of font 0 / 256) See Excel Internal Units for more information in Excel internal units.

    Remarks

    Use ExcelMetrics.ColMult to convert the internal units to pixels.

    Syntax

    Namespace: FlexCel.Core

    public abstract Int32 GetColWidth(Int32 sheet, Int32 col, Boolean HiddenIsZero)

    Parameters

    <-> Parameter Type Description
    sheet Int32 Sheet where to look for the width.
    col Int32 Column Index (1 based)
    HiddenIsZero Boolean If true, the width returned for a hidden column will be 0 and not its real width.

    Returns

    Column width in internal excel units.(Character width of font 0 / 256)

    Examples

        double ColWidthInPixels = xls.GetColWidth(Col) / ExcelMetrics.ColMult(xls);
    

    See also

    • ExcelFile
    In This Article
    Back to top FlexCel Studio for the .NET Framework v7.24.0.0
    © 2002 - 2025 tmssoftware.com