Excel: Flat File Formats Noncontiguous Selections VerticallyLast reviewed: November 30, 1994Article ID: Q78637 |
The information in this article applies to:
SUMMARYIn Microsoft Excel, if you use the Flat File add-in macro to export a noncontiguous selection to a text file, each individual range is printed below the previous one, regardless of the relationship of the two ranges on the worksheet. Note that in Microsoft Excel version 5.0, you can use the Text Import Wizard when you open a text file to control what data to import and how the data should be spread across columns.
MORE INFORMATIONFlat File (FLATFILE.XLA) allows you to export data from a worksheet to a text file. It will not preserve the relative positions of ranges to each other when you export a noncontiguous selection. For example, if the data that you are exporting includes the noncontiguous ranges A1:A4 and D1:D4, you might expect the resulting text file to consist of two columns of data. However, because Flat File treats each range in the non-contiguous selection separately, you will see a single column of data containing the values from both ranges in the resulting text file. Note: The "Microsoft Excel User's Guide" version 3.0 states on page 684 that the export range you select must be a contiguous range. The "Microsoft Excel User's Guide 2" version 4.0 states on page 152 that the export range must be contiguous. This is incorrect. Flat File is able to export a noncontiguous selection.
WorkaroundThis behavior is by design. To work around this behavior, you must manipulate the ranges to export so that they are next to each other and select them as a contiguous range. In some cases, you can do this by hiding the columns or rows that you do not want to include in your export range, as the Flat File macro will only export what is displayed on the screen.
REFERENCES"Microsoft Excel User's Guide 2," version 4.0, page 152 "Microsoft Excel User's Guide," version 3.0, page 78, 543, 683-684
|
KBCategory: kbdocerr
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |