XLS to CSV Conversion - #'s convert to Date

G

Guest

When I convert an XLS doc into CSV, I have one field that converts to a date
and I do not want it to. The format of the column is text but it does not
seem to matter. The numbers in the field are alpha-numeric, if they contain
an alpha, it does not convert ot a date, if it is just numeric, it converts
to a date. Here is an example of the values:

1-2006
1-1SR0

Help!
 
G

Guest

1. open a fresh, empty worksheet
2. format cell A1 as text and enter 1-2006 in it
3. save the file as Book1.csv
4. exit Excel
5. open Book1.csv in NotePad
you should see 1-2006 just as you entered it.
6. close NotePad
7. open Book1.csv in Excel
you should see that Excel converts it to a date upon re-opening

Its not saving that's the problem; its re-opening.
 
D

Dave Peterson

You sure it converted it to a date when the CSV file was created?

Did you use Notepad to verify the output or did you just re-import it to excel?
 
M

mrice

You could try putting an apostrophe before the numbers to force Excel to
see the data as text.

e.g. 1-2006 becomes '1-2006
 
G

Guest

Thanks, you are right.

Warren

Gary''s Student said:
1. open a fresh, empty worksheet
2. format cell A1 as text and enter 1-2006 in it
3. save the file as Book1.csv
4. exit Excel
5. open Book1.csv in NotePad
you should see 1-2006 just as you entered it.
6. close NotePad
7. open Book1.csv in Excel
you should see that Excel converts it to a date upon re-opening

Its not saving that's the problem; its re-opening.
 

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

Top