Microsoft KB Archive/75658

{| = Data Loss Using Best Fit When Exporting with FLATFILE.XLA =
 * width="100%"|

Last reviewed: November 3, 1994

Article ID: Q75658 The information in this article applies to:
 * Microsoft Excel for Windows, versions 3.0, 4.0

SUMMARY
Microsoft Excel supplies an add-in macro (FLATFILE.XLA) that allows you to export data from a worksheet to a text file. If the columns containing the data have been sized using the Best Fit option, the exported data may be truncated in the text file.

MORE INFORMATION
The FLATFILE.XLA add-in macro is located in the Excel\Library subdirectory. The Best Fit option is found in the Format Column Width menu choice and fits the column width to the length of the longest data string in the column.

Note that although Microsoft Excel version 5.0 does not include the File Functions (FILEFNS.XLA) add-in macro (or the associated FILEFNS.DLL file), if you install Microsoft Excel version 5.0 without deleting the earlier version of Microsoft Excel (3.0 or 4.0), the FILEFNS.XLA add-in macro will still be available and will function normally (because the file is not deleted when you install version 5.0).

The exported data is most likely to be truncated in the text file if the following conditions are true:


 * The data to be exported is formatted using a proportional font.
 * The Retain Cell Formats option in the Data Export menu is checked.
 * A screen font with a point size less than 12 is used.

WORKAROUNDS
To avoid truncating text when you use the FLATFILE.XLA add-in, do the following:


 * Increase column widths slightly.
 * Increase the font size to at least 12.
 * Deselect Retain Cell Formats in the Data Export menu.
 * Use a nonproportional font, such as Courier.