Search Results for

    Show / Hide Table of Contents

    TXlsFile.GetStyle Method

    Overloads

    • TXlsFile.GetStyle(Integer)
    • TXlsFile.GetStyle(string, Boolean)

    TXlsFile.GetStyle(Integer)

    Returns the named style at position index for the workbook

    Syntax

    Unit: FlexCel.XlsAdapter

    function TXlsFile.GetStyle(const index: Integer): TFlxFormat; overload; override;

    Parameters

    <-> Parameter Type Description
    const index Integer Position in the list of styles (1 based).

    Returns

    The named style definition.

    See also

    • TXlsFile

    TXlsFile.GetStyle(string, Boolean)

    Returns a named style for the workbook. You can also use this method to check if a style exists or not.

    Syntax

    Unit: FlexCel.XlsAdapter

    function TXlsFile.GetStyle(const name: string; const convertToCellStyle: Boolean): TFlxFormat; overload; override;

    Parameters

    <-> Parameter Type Description
    const name string Name for the style. It might be a user defined name, or a built-in name. You can get a list of builtin names with TExcelFile.GetBuiltInStyleName
    const convertToCellStyle Boolean If true, the returned style will have the "IsStyle" property set to false, so you can apply this TFlxFormat to a cell. If false IsStyle will be true and you can use the format definition in style definitions.
    Setting this parameter to true is exactly the same as setting it to false and setting "IsStyle" property in the result to false, and also setting the parent of the resulting cell format to the cell style.

    Returns

    The style definition, or null if the style doesn't exists.

    See also

    • TXlsFile
    In This Article
    Back to top FlexCel Studio for VCL and FireMonkey v7.24
    © 2002 - 2025 tmssoftware.com