Results 1 to 2 of 2
  1. #1
    Silver Lounger
    Join Date
    Jan 2001
    La Jolla, CA
    Thanked 77 Times in 72 Posts

    CSV to Excel (2002)

    I am importing CSV files into Excel, either by double-clicking the CSV file in Explorer, or dragging the file from Explorer into Excel (version 10). Excel is being overly helpful and converting all fields -- even those that are in double-quotes. I thought the whole idea was that Excel would leave these values alone.

    For instance, if the CSV file contains


    I expected Excel to treat the first two fields as numbers, but leave the last two fields as text. Unfortunately, it converts all four fields to numeric, and thus the leading zero (which I want) disappears from the last field.

    This has to be done a lot, so I do not want to go through the wizard process.

    Is there some way to build the CSV file that indicates to Excel that it should treat a field as text even though it might look like a number or a date or whatever?!?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: CSV to Excel (2002)

    Do all CSV files have the same structure? If so, you could create a macro to open the files and specify the data type for each column. If not, you're out of luck, I fear.

Posting Permissions

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