That happens in ImportCSVInt, in the last check before defaulting to a text field. SysUtils.TryStrToDateTime is used to check if we have a datetime cell, but TryStrToDateTime skips any non-numeric characters before trying any real date conversion.
I think this is unexpected behaviour for an import routine. TryStrToDateTime should not be used to check if it is a datetime cell. (XLSUtils5.TryStrToDateTime looks like it uses the same routine, so it would not be suitable as a replacement.)
Input:
Code: Select all
1091;torgeir25.11@gmail.com;429;2.000 ;0000013540
Code: Select all
1091 25.11.2015 429 2 13540
In D6 this scanning past non-numeric characters is not done, but it looks like it happens in all versions from D2010 onwards. I am testing in XE8.
I hope you agree with me that it is a bug that should be fixed, or am I missing an obvious workaround?
::tor