Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
wnagatani
 
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!
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
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   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
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   Report Post  
Posted to microsoft.public.excel.misc
mrice
 
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   Report Post  
Posted to microsoft.public.excel.misc
wnagatani
 
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!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 08:14 PM.

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

About Us

"It's about Microsoft Excel"