Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm surprised that there was any difference in the way the data was treated.
In my simple tests (using USA date settings (mdy order)), both worked the same way. But (if I recall correctly), opening CSV files via code will use USA settings. I wouldn't do it. Instead I'd rename (or copy) the .csv files to .txt (manually or in code) and use .opentext to open the file(s). Then I could specify each field the way I wanted. I'd be very concerned about date fields coming in as date fields--but not representing the date in the actual source (01/02/03 could come in as Jan 2, 2003 or Feb 1, 2003 or ...). I'd want to make sure all the ambiguous dates would be brought in correctly. Ranjith Kurian wrote: I have a lot of csv file, in that file the date column contain both text and date values, but when i change my system settings to UK and if i manually change the date format using custom type "dd-mmm-yy", all the date and text value of that column will easily change to dd-mmm-yy, but when i created a macro to do the same thing, the problem iam facing here is when it open each csv files the date is getting changed(the column contains both text and date values) when i open the file using the below code it opens the file in a actual format(date values will not change) ChDir "C:\Ranjith Report\FGA DEBT\Raw" Workbooks.Open Filename:="C:\Ranjith Report\FGA DEBT\Raw\ABC.csv" but when i open the file using the below code it opens in a different format(date value changes) arrWorkBook = Array("ABC.csv","DEF.csv") Workbooks.Open Filename:="C:\Ranjith Report\FGA DEBT\Raw\" & arrWorkBook(intTemp) -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Unable to open a 82 KB XLSM file due to "Too many different cellformats" & "Converter failed to open the file." errors. | Setting up and Configuration of Excel | |||
In Excel - Use Windows Explorer instead of File Open to open file | Excel Discussion (Misc queries) | |||
Open a file do a macro ( made) and open next succesive file | Excel Programming | |||
Open File or Switch Between Windows if File is Open | Excel Programming | |||
Open File or Switch Between Windows if File is Open | Excel Programming |