Microsoft KB Archive/30008

-

{| 2.x 3.00 4.00 4.00a 5.00 | 2.20 2.21 3.00 WINDOWS                 | OS/2 kbusage The information in this article applies to:
 * width="100%"|


 * Microsoft Excel for Windows, versions 4.0, 4.0a, 5.0
 * Microsoft Excel for OS/2 versions 2.2, 2.21, and 3.0

SUMMARY
When using the FWRITELN function to output a formatted number from a worksheet to a file, the formatting does not remain. For example, a date is written to the file as a serial number instead of in the date format used on the worksheet.

To write formatted numbers to a file, use the following formula:

=FWRITELN(file_number,TEXT(value,format_text)) The format_text section of the formula is the format of the cell acquired from the Format Number command. For example, if the active cell on a worksheet contains 25-Mar-88, the macro formula used to write this to a file is the following: =FWRITELN(file_number,TEXT(ACTIVE.CELL,&quot;d-mmm-yy&quot;)) For more information on the FWRITELN and TEXT functions, see the &quot;Microsoft Excel Functions and Macros&quot; manual.
 * }

-

Last reviewed: November 4, 1994

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.