Search Results for

    Show / Hide Table of Contents

    TFlxFormat Class

    Format for one cell or named style. Cell formats are used to format cells, Named styles to create styles. A Cell format can have a parent style format, even when normally this is null (parent is normal format). Named styles will have a non-null Style property. Cell formats will have style = null.

    Syntax

    Namespace: FlexCel.Core

    public class TFlxFormat: ICloneable

    Fields

    Name Description
    FillPattern Fill pattern.
    IsStyle When true this format is a named style, when false a cell format.

    Methods

    Name Description
    CreateStandard2007 Returns a standard TFlxFormat for Excel 2007. (Font name is Calibri, etc). You will normally want to use ExcelFile.​Get​Default​Format instead of this, since it returns the default format for a specific file, and not a generic format like this.
    Clone Returns a deep copy of the format.
    Equals Returns true if 2 instances have the same values.
    GetHashCode Returns the hashcode of the object.

    Properties

    Name Description
    Font Cell Font.
    Borders Cell borders.
    Format Format string. (For example, "yyyy-mm-dd" for a date format, or "#.00" for a numeric 2 decimal format)
    This format string is the same you use in Excel under "Custom" format when formatting a cell (for English versions of Excel), and it is documented in the Excel documentation. You can use APIMate to find out which string to use from a format you entered in Excel.
    HAlignment Horizontal alignment on the cell.
    VAlignment Vertical alignment on the cell.
    Locked Cell is locked.
    Hidden Cell is Hidden.
    WrapText Cell wrap.
    ShrinkToFit Shrink to fit.
    Rotation Text Rotation in degrees.

    When this value is from 0 to 90 then this is the rotation degrees in the up direction.

    When this value is from 91 to 180 then this is a rotation in the down direction. 91 means -1 degree rotation, 92 means -2 degrees, and so on until 180 which means -90 degrees.

    255 is vertical text.

    Other values are invalid.
    Indent Indent value. (in characters). This value can't be bigger than 15 in Excel 2003 or earlier, and no bigger than 250 in Excel 2007 or newer.
    Lotus123Prefix If true the prefix for the cell is compatible with Lotus 123.
    ReadingOrder Reading order for the cell.
    ParentStyle Name of the Parent style. Normally you will want to keep it at null (parent is normal style), but you can write an existing style here.
    If IsStyle is true this property is not used.
    NotNullParentStyle This is similar to ParentStyle but will return "Normal" when the parent is null.
    LinkedStyle If this object holds a Cell format, LinkedStyle specifies which properties of the cell format are linked to its parent style.
    If this object holds a Style format, LinkedStyle specifies the default set of properties that will be applied when you use this style from Excel.
    WillWrap Returns true if the text will wrap in the cell. This might be because WrapText is true, of because the alignment is justify or distributed.
    In This Article
    Back to top FlexCel Studio for the .NET Framework v7.24.0.0
    © 2002 - 2025 tmssoftware.com