eliW
Well-known Member
- Joined
- Mar 2, 2002
- Messages
- 1,940
Hi,
I am using this partial code to import and process a CSV file generated in other application.
Now, it works fine with users using Excel 2000, but with users using Excel 2003 -the Date format is reversed and all calculations goes wrong.
I went through some answers in this forum concerning this problem and found that Excel 2003 interprets CSV files directly without giving a chance to assign desired format to DATES. There was an idea to convert the csv file to txt file -and this was useful also in my case.
My question is: how can I alter this code to open a CSV file but to treat it as a TXT without forcing the user to copy or rename the original CSV file manually. Also maintaining same code for Excel 2000 and 2003 users.
I'll appreciate accepting some ideas on this.
Eli
I am using this partial code to import and process a CSV file generated in other application.
Code:
myfile = Application.GetOpenFilename("CSV Files,*.csv")
If myfile = False Then End
Workbooks.OpenText Filename:=myfile, _....
Now, it works fine with users using Excel 2000, but with users using Excel 2003 -the Date format is reversed and all calculations goes wrong.
I went through some answers in this forum concerning this problem and found that Excel 2003 interprets CSV files directly without giving a chance to assign desired format to DATES. There was an idea to convert the csv file to txt file -and this was useful also in my case.
My question is: how can I alter this code to open a CSV file but to treat it as a TXT without forcing the user to copy or rename the original CSV file manually. Also maintaining same code for Excel 2000 and 2003 users.
I'll appreciate accepting some ideas on this.
Eli