CSV

P

Peter Ostermann

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
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top