Data Loss Using Best Fit When Exporting with FLATFILE.XLA

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.

REFERENCES

"Microsoft Excel User's Guide," version 3.0, pages 676, 684


KBCategory: kbusage
KBSubcategory:

Additional reference words: 3.00 4.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 3, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.