Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, 2021, and Excel in Microsoft 365. 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: Correctly Saving Delimited Files.

Correctly Saving Delimited Files

Written by Allen Wyatt (last updated July 16, 2025)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, 2021, and Excel in Microsoft 365


3

Raymond indicated that he was having some problems properly exporting delimited files from within Excel. Raymond was requesting that Excel create a file using the tab character as a delimiter. It seems that Excel would not reliably add a tab character at the end of a row when the last field in the row was empty.

Actually, this is how Excel is designed to operate. When exporting information to a delimited file, each row in the data table is handled independently. If one particular row has fewer fields than other rows, Excel doesn't "pad out" the exported row with "blank" fields. This can, of course, lead to problems with some other programs that use the Excel-created file and rely on a static number of fields in each input row.

A workaround for this potential problem is to simply make sure that Excel always has something in every cell of the final column of your data table. This is actually easier than it sounds—all you need to do is make sure the right-most column contains some unique text string, perhaps something like [{|}]. (It is unlikely that such a string would be used elsewhere in your data.) When you export to a delimited file, Excel will always export the same number of fields per row, right up to the unique text string. Then, when you import the delimited file into your other program, you can instruct it to ignore the last field of each row that it imports.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10564) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, 2021, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Correctly Saving Delimited Files.

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

Saving in MS-DOS Text Mode

Over the years Microsoft has made changes in Word. One change is to the import and export filters provided with the ...

Discover More

Condensing Multiple Worksheets Into One

Want a quick way to combine your worksheets? This tip features a simple macro to do the task for you.

Discover More

Seeing a Worksheet Thumbnail in Windows

When you save a workbook, you have the opportunity to save a thumbnail image that can be displayed within Windows. Here's ...

Discover More

Best-Selling VBA Tutorial for Beginners Take your Excel knowledge to the next level. With a little background in VBA programming, you can go well beyond basic spreadsheets and functions. Use macros to reduce errors, save time, and integrate with other Microsoft applications. Fully updated for the latest version of Office 365. Check out Microsoft 365 Excel VBA Programming For Dummies today!

More ExcelTips (ribbon)

Error Opening Second Workbook

If you try to open a second workbook and you see an error message, it could be because of the way you are opening the ...

Discover More

Renaming a Workbook

Renaming a workbook from within Excel can seem daunting, but it is actually quite easy. All you need to do is use the ...

Discover More

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
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 seven minus 6?

2025-07-16 17:19:46

Kiwerry

I must be misunderstanding something. To try out "...When exporting information to a delimited file, each row in the data table is handled independently. If one particular row has fewer fields than other rows, Excel doesn't "pad out" the exported row with "blank" fields. " I created a sheet with six rows, some having blank cells in varying columns, then exported it into CSV (using bot the "Save As" and the "Export" commands, as tab delimited and as space delimited (PRN) files. Whether I viewed these files in a text editor or imported them into Excel the structure remained as expected - neither positions in the viewer nor cells in the re-imported files had unexpected contents.

Should this simple test not reflect real world conditions perhaps a macro-based solution would deliver consistent results.


2025-07-16 07:39:23

jamies

Also, regarding export and import of data "records", table entries, and rows
If you export a set of data that does not have an entry in the first field/ column then Excel and some other facilities may put the first actual data entry of the supplied "line" into column "A" shifting all other data entries to the left.

So - definitely have an id of some kind in that first cell of every line of data -
maybe a data line number , or just an alpha value -
remembering that excel and some other facilities check the first character of a cell for special meaning -
apostrophe, #, quotations, @, /, \, imbedded e, or E (scientific presentation) , +, -, decimal point, zero, or currency sign and maybe even {, and [
so ensure the appropriate "type" is assumed, or set for the data input !


2025-07-16 07:26:32

jamies

And - do check that the file being created is using the correct codepage for the Apps and processing of that data.

And - just because 1 facility is reading it and displaying it as wanted
does not mean that others will -
MS changed the codepage used by default by Notepad.exe,
and very kindly made sure that you cannot set a default for the program,
having to select an appropriate one every time you go to save a file using it!

Major clue to not having set the needed page is the display, and printing of the apostrophe character - and the "Smart" versions,
as you will now be seeing in many webpages and online forms .


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