Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Tim G
 
Posts: n/a
Default Opening CSV, How to Tell Excel String is not a Date?

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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
exceluserforeman
 
Posts: n/a
Default Opening CSV, How to Tell Excel String is not a Date?

(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.



"Tim G" wrote:

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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
Tim G
 
Posts: n/a
Default Opening CSV, How to Tell Excel String is not a Date?

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.

"exceluserforeman" wrote:

(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.



"Tim G" wrote:

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.

  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Opening CSV, How to Tell Excel String is not a Date?

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.

Tim G wrote:

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.


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
Tim G
 
Posts: n/a
Default Opening CSV, How to Tell Excel String is not a Date?

Dave:

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

-Tim

"Dave Peterson" wrote:

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.

Tim G wrote:

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.


--

Dave Peterson



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
Keep Excel from opening new instance widman Excel Discussion (Misc queries) 7 October 1st 05 01:53 AM
format date in excel Nigel Excel Discussion (Misc queries) 2 September 15th 05 09:52 PM
Opening two separate instances of Excel Ron Bishop Excel Discussion (Misc queries) 2 August 4th 05 05:30 PM
Excel 2K3: Opening a spreadsheet, also opens book1.xls? Newtek Excel Discussion (Misc queries) 3 July 6th 05 07:56 PM
Excel file modification date GROSNER Excel Discussion (Misc queries) 5 March 4th 05 01:19 AM


All times are GMT +1. The time now is 08:56 PM.

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

About Us

"It's about Microsoft Excel"