+ Reply to Thread
Results 1 to 5 of 5

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

  1. #1
    Tim G
    Guest

    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. #2
    exceluserforeman
    Guest

    RE: 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. #3
    Tim G
    Guest

    RE: 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. #4
    Dave Peterson
    Guest

    Re: 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. #5
    Tim G
    Guest

    Re: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1