Table of Contents

ExcelFile.ConvertString Method

Overloads

ExcelFile.ConvertString(TRichString, Int32)

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

Remarks

See SetCellFromString(Int32, Int32, TRichString, Int32) for more information.

Syntax

Namespace: FlexCel.Core

public Object ConvertString(TRichString value, ref Int32 XF)

Parameters

<-> Parameter Type Description
value TRichString RichString to convert.
ref XF Int32 XF of the cell. It might be modified, for example, if you are entering a date.

Returns

value converted to the best datatype.

See also

ExcelFile.ConvertString(TRichString, Int32, String[])

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

Remarks

See SetCellFromString(Int32, Int32, TRichString, Int32) for more information.

Syntax

Namespace: FlexCel.Core

public abstract Object ConvertString(TRichString value, ref Int32 XF, String[] dateFormats)

Parameters

<-> Parameter Type Description
value TRichString RichString to convert.
ref XF Int32 XF of the cell. It might be modified, for example, if you are entering a date.
dateFormats String[] 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