Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All,
I have to import CSV files into excel. A regular issue with this is that often the CSV files will contain data (in this case account codes) that excel interprets as dates (such as '3-8000' being converted to 1 Mar 8000). Nothing unusual so far, in that we handle that issue by importing manually (External Data - Text import), and specifying that the field in question is imported as TEXT not GENERAL. However, I have a file that, when I double click on it, it opens up perfectly (except with dates where it should be text as outlined above), but if I manually import that file, it then chokes on some control characters that are in the CSV file (specifically an ASCII Code 13 which is a carriage return). I haven't got much of a clue on what the best way to go from here would be, so looking for any suggestions. One possible idea that is probably a VBA solution (happy to go down that track if easiest) is to somehow do a search and replace on the source CSV file and convert the CRs (ASCII 13) to, say, spaces (ASCII 32). I think I'd need to do that to the external CSV file though before it got imported, hence the VBA requirement? Thanks in advance for any ideas. -- Alan. The views expressed are my own, and not those of my employer or anyone else associated with me. My current valid email address is: This is valid as is. It is not munged, or altered at all. It will be valid for AT LEAST one month from the date of this post. If you are trying to contact me after that time, it MAY still be valid, but may also have been deactivated due to spam. If so, and you want to contact me by email, try searching for a more recent post by me to find my current email address. The following is a (probably!) totally unique and meaningless string of characters that you can use to find posts by me in a search engine: ewygchvboocno43vb674b6nq46tvb |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Importing CSV - Avoiding conversion to 'dates', but totally different results when controlling manually | Excel Discussion (Misc queries) | |||
Infopath w/ manually entered values in drop-down and qry results | Charts and Charting in Excel | |||
importing a jpg causes conversion dialog box to open | Excel Discussion (Misc queries) | |||
Avoiding "0" importing blank cells from another Excel file | Excel Discussion (Misc queries) | |||
Totally Lost - Dates in huge table, Range finder | Excel Discussion (Misc queries) |