Search Results for

    Show / Hide Table of Contents

    TXlsFile.ConvertString Method

    Converts a string into the best datatype (a boolean, a number, etc)

    Remarks

    See TExcelFile.SetCellFromString(Integer, Integer, TRichString, Integer) for more information.

    Syntax

    Unit: FlexCel.XlsAdapter

    function TXlsFile.ConvertString(const value: TRichString; var XF: Integer; const dateFormats: TArray<string>): TCellValue; overload; override;

    Parameters

    <-> Parameter Type Description
    const value TRichString RichString to convert.
    var XF Integer XF of the cell. It might be modified, for example, if you are entering a date.
    const dateFormats TArray<string> Note:This format must be expressed with .NET notation, as specified here: http://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx .A list of formats allowed for dates and times. Windows is a little liberal in what it thinks can be a date, and it can convert things like "1.2" into dates. By setting this property, you can ensure the dates are only in the formats you expect. If you leave it null, we will trust "DateTime.TryParse" to guess the correct values.

    Returns

    value converted to the best datatype.

    See also

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