View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
jmoffat[_18_] jmoffat[_18_] is offline
external usenet poster
 
Posts: 1
Default opening a .csv file via VB


This is probably specific to Non-American versions but ...

When I open a csv file via excel I get the expected format:

MATR PROD_MONTH TIS
1 01/04/2002 3
1 01/04/2002 6
1 01/04/2002 9

The date formt is as written in the file dd/mm/yyyy in the abov
example this is the 1st of april.

When I open the file using

Workbooks.Open Filename:="C:\test.csv"

I get:

MATRIX PROD_MONTH TIS
1 04/01/2002 3
1 04/01/2002 6
1 04/01/2002 9

The date is reversed internally to USA type mm/dd/yyyy - but because m
regional settings are UK, excel interprets this as 4th January.


Any ideas

--
jmoffa
-----------------------------------------------------------------------
jmoffat's Profile: http://www.excelforum.com/member.php...nfo&userid=115
View this thread: http://www.excelforum.com/showthread.php?threadid=47581