Macro Sheets Only
Writes text to a file, starting at the current position in that file. (For more information about a file's position, see FPOS.) If FWRITE can't write to the file, it returns the #N/A error value.
Syntax
FWRITE(file_num, text)
File_num is the unique ID number of the file you want to write data to. File_num is returned by a previously executed FOPEN function. If file_num is not valid, FWRITE returns the #VALUE! error value.
Text is the text you want to write to the file.
Example
The following function writes the current month to the open file identified as FileNumber:
FWRITE(FileNumber, TEXT(MONTH(NOW()),"mmmm"))
Related Functions
FOPEN Opens a file with the type of permission specified
FPOS Sets the position in a text file
FREAD Reads characters from a text file
FWRITELN Writes a line to a text file
List of DDE/External Functions