#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default CSV

Hello,



if I open a .CSV dataset by excel and distribute the comma separated values
from column "A" to their columns using the wizard, the date containing cells
show the German version DD/MM/YYYY of the dates, which is meant that way,
and is totally correct.



If I open the same .CSV dataset by VBA, the comma separated data from column
"A" are already distributed to their columns and the Date containing cells
show the US date version MM/DD/YYYY, which causes wrong dates when
transferred to a German Excel worksheet.



I would like to distributing the data from column "A" by VBA routine to
their columns. I do have a the macro, but how can I open the .CSV dataset by
VBA in a way, that the comma separated values remain in the column "A",
enabling me of making use of my VBA routine disposing the data to the
columns?



Regards

Peter Ostermann


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default CSV

If your code uses the opentext method, then make sure your info array
specifies the date order for that column. You might also have to change the
extension from .CSV to text since Excel seems to ignore settings when opening
a CSV.

--
Regards,
Tom Ogilvy


"Peter Ostermann" wrote:

Hello,



if I open a .CSV dataset by excel and distribute the comma separated values
from column "A" to their columns using the wizard, the date containing cells
show the German version DD/MM/YYYY of the dates, which is meant that way,
and is totally correct.



If I open the same .CSV dataset by VBA, the comma separated data from column
"A" are already distributed to their columns and the Date containing cells
show the US date version MM/DD/YYYY, which causes wrong dates when
transferred to a German Excel worksheet.



I would like to distributing the data from column "A" by VBA routine to
their columns. I do have a the macro, but how can I open the .CSV dataset by
VBA in a way, that the comma separated values remain in the column "A",
enabling me of making use of my VBA routine disposing the data to the
columns?



Regards

Peter Ostermann



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



All times are GMT +1. The time now is 12:45 AM.

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

About Us

"It's about Microsoft Excel"