S
sorin
I am writing a macro to import data in a txt file (tab delimited
values) for further processing.
Until this date issue everything worked out just fine...
I have a column that contains dates (actually timestamp) in dd-mm-yyyy
hh:nn format. I modified my opentext call to set DMY format like this:
Call Workbooks.OpenText(Filename:="D:\working\test\data.txt", _
DataType:=xlDelimited, _
DecimalSeparator:=",", ThousandsSeparator:=".",
_
FieldInfo:=Array(Array(15, xlDMYFormat),
Array(16, xlDMYFormat)))
However the resulting column is shown as text (I need this to be a date
because a chart use dates in this column).
If I manually select each cell in this column, press F2 and ENTER
(enter and exit edit mode without modify anything), automatically Excel
recognize the field as Date!
Any idea how to get automatically all column data converted to dates?
regards
values) for further processing.
Until this date issue everything worked out just fine...
I have a column that contains dates (actually timestamp) in dd-mm-yyyy
hh:nn format. I modified my opentext call to set DMY format like this:
Call Workbooks.OpenText(Filename:="D:\working\test\data.txt", _
DataType:=xlDelimited, _
DecimalSeparator:=",", ThousandsSeparator:=".",
_
FieldInfo:=Array(Array(15, xlDMYFormat),
Array(16, xlDMYFormat)))
However the resulting column is shown as text (I need this to be a date
because a chart use dates in this column).
If I manually select each cell in this column, press F2 and ENTER
(enter and exit edit mode without modify anything), automatically Excel
recognize the field as Date!
Any idea how to get automatically all column data converted to dates?
regards