Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Testing and testing again just make me realize that a strange thing is
happening: I record a macro and open text file from Excel menu, works fine. Run the macro will just fail to convert dates!!! It seams this feature is not working only for VBA calls! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2000 Cell Format Problem | Setting up and Configuration of Excel | |||
Excel 2000 date format cannot be set to Australian date format | Excel Discussion (Misc queries) | |||
Date format is not correct when using OpenText in Excel 2000 | Excel Programming | |||
After OpenText all pastes from external apps use format from OpenText | Excel Programming | |||
Excel 2000 Date Import Problem | Excel Programming |