
Tips.Net > ExcelTips Home > Files > Stopping Date Parsing when Opening a CSV File
Summary: You can double-click on a CSV (comma separated values) file in Windows, and Excel obediently opens and loads the file. You may not get the results you expect, however, as Excel may parse some of the values in the file incorrectly. In that case, you need to take greater control over how Excel interprets that data. Here’s how to do it. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, Excel 2003, and Excel 2007.)
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:
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.
Tip #3228 applies to Microsoft Excel versions: 97 2000 2002 2003 2007
More Power! For some people, the prospect of creating macros can be scary. Those who conquer their fears, however, find they become much more confident and productive once they learn how to make Excel do exactly what they want. ExcelTips: The Macros is an invaluable source for learning Excel macros. You are introduced to the topic in bite-sized chunks, pulled from past issues of ExcelTips. Learn at your own pace, exactly the way you want.
Check out ExcelTips: The Macros today!
Thousands of ExcelTips, available for immediate download. Have all the Microsoft Excel info you need, right at your fingertips. (more information...)
Ask an Excel Question
Make a Comment
ExcelTips FAQ
ExcelTips Premium
Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 Tips
WordTips
Advertise on the
ExcelTips Site