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: Avoiding Scientific Notation on File Imports.
by Allen Wyatt
(last updated June 5, 2017)
Mark has a text file that he routinely imports into an Excel workbook. The file is created by a different program, and one of the columns in the file contains numbers, the letter "e," and then more numbers. When importing the file into Excel, the column is converted to scientific notation by Excel, rather than being treated as text.
Chances are good that the file you are importing—the one created by the other program—is a CSV file. This means that the values in the file are "comma separated" and easily understood by a program such as Excel. If you open a CSV file, Excel just "does it," without asking very much about the data being imported. This is where the problem would occur—Excel is simply making the assumption that the problem column contains numeric values in scientific notation.
The solution is to get Excel to ask you how you want the data imported. The key to doing this is to rename the file you are importing. Change the file's extension from CSV to something else, such as DAT. When you then try to open the file in Excel (start Excel and then use Open to locate and try to open the newly renamed file), the Import Wizard starts. This wizard gives you complete control over how Excel treats your incoming data.
Most of the wizard is self-explanatory. You'll want to pay particular attention to the third step of the wizard which allows you to specify the data type for each column of the import data. The default data type for each column is "general," which means that Excel tries to interpret the data based upon its regular parsing routines. Instead, you want to locate the column that contains the problem data and specify that the column should be treated as text—exactly what you want.
If you have to import this type of file regularly, you might want to create a macro that does the import for you. All you need to do is use the macro recorder to record each step of the Import Wizard. You can then replay the macro anytime you need to import the file again.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2426) 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: Avoiding Scientific Notation on File Imports.
Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!
If you've got some older data around your office that started in an old Lotus 1-2-3 system, you may want to open it in Excel. ...Discover More
The scrapheap of computing history is littered with programs that had their moment in the sun and then fell by the wayside. ...Discover More
Want a quick way to see the full path name associated with a workbook? You can add a tool to the menu bar that displays the ...Discover More
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
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.