Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Problem with OpenText in Excel 2000 (date format)

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Problem with OpenText in Excel 2000 (date format)

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2000 Cell Format Problem Bill Helbron Setting up and Configuration of Excel 1 May 6th 09 09:30 PM
Excel 2000 date format cannot be set to Australian date format Brian Jones Excel Discussion (Misc queries) 1 March 30th 05 06:03 AM
Date format is not correct when using OpenText in Excel 2000 Mats L Excel Programming 1 September 14th 04 01:15 AM
After OpenText all pastes from external apps use format from OpenText Jim[_31_] Excel Programming 1 November 8th 03 02:17 AM
Excel 2000 Date Import Problem Tom Ogilvy Excel Programming 0 August 6th 03 02:30 PM


All times are GMT +1. The time now is 05:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"