Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Stopping Date Parsing when Opening a CSV File.

Stopping Date Parsing when Opening a CSV File

Written by Allen Wyatt (last updated September 11, 2021)
This tip applies to Excel 97, 2000, 2002, and 2003


Marc has a user at his company who is trying to open a .CSV file in Excel. Some of the numbers in the file are in the format of "2-1" (or something similar). During the import, Excel parses this information as a date. If the piece of data is clearly something outside a valid date range (such as 2-134), then Excel imports it as would be expected. Marc is wondering how his user can force Excel to not parse this data as dates but to import them as text fields.

There at two easy ways you can approach this issue. First is to import the file in the following manner:

  1. Choose Import External Data from the Data menu and then choose Import Data from the resulting submenu. Excel displays a standard Open dialog box.
  2. Use the controls in the dialog box to select the .CSV file you would like to open and then click Open. Excel starts up the Text Import Wizard. (See Figure 1.)
  3. Figure 1. The Text Import Wizard.

  4. Go through the steps of the Text Import Wizard to specify how Excel should interpret the data that it imports from the .CSV file. In one of those steps you can indicate that the non-date columns (the ones incorrectly interpreted as dates) are actually text.
  5. When you are done with the steps of the wizard, click Finish. Your data is imported in accordance with your specifications.

The other way to approach the issue also involves the Text Import Wizard, but how you display it is different. In this approach, you use Windows to rename the file so that it has a .TXT extension instead of a .CSV extension. Now, when you use Excel to open the file, it displays the Text Import Wizard because it isn't quite sure how to interpret what it is going to be loading. You can use the Text Import Wizard in the same manner as already described earlier in this tip.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3228) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Stopping Date Parsing when Opening a CSV File.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Exact Matches with DSUM

The DSUM function is very handy when you need to calculate a sum based on data that matches criteria you specify. If you ...

Discover More

Setting Consistent Column Widths in Multiple Tables

Tables are great for organizing and presenting information in a document. If you have a document containing multiple ...

Discover More

Creating Labels

Using Word to create and print labels is a snap. All you need to do is provide the text you want on the labels, pick a ...

Discover More

Professional Development Guidance! Four world-class developers offer start-to-finish guidance for building powerful, robust, and secure applications with Excel. The authors show how to consistently make the right design decisions and make the most of Excel's powerful features. Check out Professional Excel Development today!

More ExcelTips (menu)

Importing Huge Data Files

Sometimes, when importing data created by other programs, you may find that there is too much for Excel to handle. Here's ...

Discover More

Saving Information in a Text File

The VBA programming language provide with Excel allows you to create and modify text files quite easily. Here's how to ...

Discover More

Setting a Default File Format

Excel normally saves workbooks using a default file format that is peculiar to your version of the program. You can ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 6 - 0?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.