reading csv data that looks like a date but isn't

  • Thread starter Thread starter lethcons
  • Start date Start date
L

lethcons

Hi

Can anyone please help me? I have a .csv file. One of the fields is entered
as "01-04" (with the quotes). How do I get Excel to read this as a string
and not interpret it as a date (which it displays as 01-Apr)? Changing the
format doesn't help - the damage is done on reading the csv data.

Thanks

-Howard


________________________________________________________
Howard Lethbridge
(e-mail address removed)
 
Hi again

I should have said that I want to do this when I double-click on the file. I
know I can do this if I open Excel and do Data/Get External Data/Import Text
File...

-Howard
 
Howard,

I don't think you have any choice. You need to use the Text Import Wizard,
so you can specify Text for that field so Excel won't interpret your data as
a date. You can do this by changing the extension to .txt (which will
invoke the Import Wizard when you open the file), or use Import (if you have
XL2002-up).

If you want to read the data into an existing workbook, Import can re-read
the text file without going through the Wizard again. Use Refresh. If
you're opening the text file (which goes into a new workbook), you can
record the import wizard settings by recording a macro as you initially go
through the Import Wizard.

There's more on text files at www.smokeylake.com/excel. "Excel and text
files."
 
Earl

Thanks very much for this. I didn't know you could refresh an external data
source, but I tried it (I have Excel 2000) and it works! So - great.

-Howard
 
Howard,

Thanks for the feedback. I had an external data source created in 2002 that
wouldn't refresh, via macro, with a customer's 2000, which I don't have
here. I'll need to check that out and update my information. Looks as if
it's possible after with 2000, from your comment.
 
Back
Top