Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: File Formats that Include Field Formats.

File Formats that Include Field Formats

by Allen Wyatt
(last updated December 26, 2015)


Wolfgang often imports CSV files that are created by other programs. When importing, he needs to specify how Excel should treat the incoming data. This causes Wolfgang to wonder if there is a file format that Excel can import that has field formats embedded so that he doesn't have to do any manual work on import.

The short answer is no, there isn't such a format. Technically you can create an XML-formatted file that uses the format of Office, and it can specify what the field formats should be. Such a file consists of only text (like a traditional CSV file) and includes specifiers about how the data should be formatted. (Complete details on how such an XML file should be structured is beyond the scope of this tip.)

Such an endeavor is undeniably daunting to many people, so you could also simply import your CSV file with no formatting applied, and then use the macro recorder to record how you manually format the freshly imported data. This macro could then be executed every time you import another file that uses the same sort of data as the first CSV file you imported.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11602) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: File Formats that Include Field Formats.

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. ...


Using SUM In a Macro

Want to use a worksheet function (such as SUM) from within a macro? Here's how easy it is to accomplish the task.

Discover More

Printing Summary Information

Word automatically maintains a number of properties for each document you create. As part of those properties you can ...

Discover More

Creating a Copy without Formulas

Excel makes copying worksheets (duplicating them) rather easy. However, you may want a worksheet copy that differs from ...

Discover More

Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!

More ExcelTips (ribbon)

How Excel Treats Disk Files

Workbooks are loaded from disk files, but workbooks aren't the only type of files that Excel can load. This tip provides ...

Discover More

Creating a Dated Backup File

As you are developing your workbooks, you might want a way to automatically create backup files that include a date and ...

Discover More

Getting Rid of Extra Quote Marks in Exported Text Files

If you don't like the way that Excel exports information you intend to use with other programs, then your best bet is to ...

Discover More

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

View most recent newsletter.


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}] 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 six more than 8?

2016-01-04 12:21:55

Steve Adams

Anne's suggestion works very well for me as well.

But for new files being imported for the first time, I have had some success in change the file extension of the CSV file to .TXT

Then open Excel first and then use the file open commands to locate the .TXT file (you will have to change the file type drop down from "All Excel Files..." to "Text Files..."

The Text Import Wizard will start automatically when opening a .TXT file.

On Step 1 select "Delimited"
If your file has page header text, you may need to select a starting row for the import (either your column header row if one exists or the first data row).

On Step 2 Select "Comma" for the delimiter (assuming you did start with a .CSV file).

On step 3 you can click on the various columns and identify some basic formats (General, Text, or Date) or to skip a column. If you have an identifying number that exceeds Excel's number place values (15 digits), select text for that column to prevent truncation (or to preserve leading zeros). Also, dates sometimes come across as text if you don't select the Date format.

2015-12-28 11:00:06


Further to my comment, I should specify to copy and paste VALUES, of course.

2015-12-28 10:11:35


I spend my days working with CSV and SAP files. I use them to create reports or gather information for reports. What I've done is create an excel spreadsheet formatted to my specifications, using the CSV data, initially. (I often use Excel Tables, as they maintain the formatting even when data is added below the last row.) I then copy and paste the data from the CSV file to the formatted spreadsheet - omitting the column headers as they would already exist in the formatting spreadsheet from previous reports. The CSV data automatically take on the formatting of the existing spreadsheet. For instance, the SAP file I use repeatedly have lots of numbers with leading zeros - like so - 00000000240. When I drop this into my formatted spreadsheet, it appears at 240, with no additional manipulation needed. Magic!

This Site

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

Newest Tips

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.