Opening CSV, How to Tell Excel String is not a Date?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In a CSV file I have values like "3-1". Excel interprets this as a date:
3/1/05. What encoding can I use in my CSV files to force Excel to read it as
a literal string? I have already tried double quotes around the string.

I am using Excel 2003.
 
(Maybe) you probably had the cells formatted as a date when you imported the
file.
Or When you import treat dates as text.


See the options in the Import wizard and try different scenarios.
 
I'm actually creating the CSV file from another program and using it to
launch Excel automatically so I do not get the file open wizard. I do want
this process to be automated.
 
How about:

="3-1"

Another way is to use 3-1, but rename the .csv to .txt.

Then when you do File|open, you'll see the text import wizard and you'll be able
to choose Text for that field.
 
Dave:

The ="3-1" works great. Thanks!

-Tim

Dave Peterson said:
How about:

="3-1"

Another way is to use 3-1, but rename the .csv to .txt.

Then when you do File|open, you'll see the text import wizard and you'll be able
to choose Text for that field.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top