A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Discussion (Misc queries)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

XLS to CSV Conversion - #'s convert to Date



 
 
Thread Tools Display Modes
  #1  
Old May 26th 06, 05:18 PM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default XLS to CSV Conversion - #'s convert to Date

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!
Ads
  #2  
Old May 26th 06, 05:47 PM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default XLS to CSV Conversion - #'s convert to Date

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.
--
Gary''s Student


"wnagatani" wrote:

> 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!

  #3  
Old May 26th 06, 05:48 PM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default XLS to CSV Conversion - #'s convert to Date

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?



wnagatani wrote:
>
> 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!


--

Dave Peterson
  #4  
Old May 26th 06, 07:32 PM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default XLS to CSV Conversion - #'s convert to Date


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


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=545930

  #5  
Old May 26th 06, 08:23 PM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default XLS to CSV Conversion - #'s convert to Date

Thanks, you are right.

Warren

"Gary''s Student" wrote:

> 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.
> --
> Gary''s Student
>
>
> "wnagatani" wrote:
>
> > 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!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell Date / Currency Convert sparx Excel Discussion (Misc queries) 2 November 28th 05 04:32 PM
Need help: convert seconds to date and time misty1 Excel Discussion (Misc queries) 2 November 26th 05 05:12 AM
Is there a macro to convert times between 2 places dep. on date? Greg Excel Worksheet Functions 1 November 15th 05 10:33 PM
NETWORKDAYS - Multiple Date Selection Annabelle Excel Discussion (Misc queries) 3 October 4th 05 07:04 PM
Date conversion Gerrym Excel Worksheet Functions 3 January 19th 05 10:46 AM


All times are GMT +1. The time now is 01:04 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 2004-2014 ExcelBanter.
The comments are property of their posters.