Microsoft KB Archive/96921

{|
 * width="100%"|

Error Merging when Data File Is Microsoft Excel CSV or Text

 * }

Q96921

-

The information in this article applies to:


 * Microsoft Word for Windows, versions 1.0, 1.1, 1.1a, 2.0, 2.0a, 2.0a-CD, 2.0b, 2.0c, 6.0, 6.0a, 6.0c
 * Microsoft Excel for Windows, versions 4.0, 4.0a, 5.0

-

SUMMARY
In Microsoft Word, if you use a Microsoft Excel file saved in the CSV or Text file format for the data file in a print merge document, you may receive one of the following error messages during the merge if the last column in the data file does not contain data in at least every 16th record:

Word Version 2.0
There are fewer fields in record  than mergefields in header record. Do you want to continue with the Print Merge?

Where  is the number of the first record of a 16-row block of records in which the last column contains no data.

Word Version 1.x
Number of fields does not match number of names in record N. Continue with Print Merge?

Where  is the number of the first record of a 16-row block of records in which the last column contains no data.

WORKAROUND
To work around this problem, do one of the following:


 * If you do not need to use the CSV or Text file format (in order to avoid errors due to commas within the data, for example) save the Microsoft Excel file in the Microsoft Excel file format.

-or-
 * If you must use the CSV or Text format, verify that the last column in the file contains some input in at least every 16 rows throughout the file. (If necessary, you can add spaces or other characters in every 16th cell, or you can reorder the columns in the worksheet so that the last column on the worksheet always contains information.)

MORE INFORMATION
In Microsoft Excel, if you save a file in Text or CSV format, Microsoft Excel places tabs or commas between each column of the worksheet. However, if the cells in the last column contain no data, the extra comma or tab indicating the blank field for that record is stripped off when the file is saved.

Microsoft Excel saves text files in 16-row blocks. Therefore, if all the cells in the last column in a 16-row block are empty, Microsoft Excel saves that area as if the column did not exist. No tabs or commas are saved for that 16-row block of cells.

Additional query words: excel 1.10a 2.0 winword2 word6 winword 2.0a-cd 6.0 5.0

Keywords : kbprint kbmerge

Issue type :

Technology :