Skip to main content
Version: Streamsheets 2.4

FILE.WRITE

Write a given range as comma separeted values to a file. You can use the Function Wizard for this function. The mounted root path is set in the .YML file. E.g.: C:rootfolder:/filefeeder. Add /filefeeder to the "Root Directory" field in the Connector to connect it to the root folder.

Syntax

=FILE.WRITE(Producer, Range, Filename, [Directory, Mode, Separator])

Arguments

NameDescription
ProducerFile Producer to use for writing the file.
RangeThe range to write to a file. Can also be a single value.
FilenameName of the file that is written.
DirectoryOptional. The directory of the file that is written. Defaults to the root directory of the File Producer.
ModeOptional. Has to be "create" or "append". Defaults to "append". "create" replaces an existing file with the same name, "append" appends instead.
SeparatorOptional. Separator to use when writing range to file. Defaults to ",".

Return Value

TRUE, if no error.

Examples

FunctionResultComment
=FILE.WRITE(|File Producer, “Message”, “file.csv”, “directory”)TRUEWrite the text “Message” to the file located at “{rootDirectory}/directory/file.csv” using the “File Producer”
=FILE.WRITE(|File Producer, A2:C3, “file.csv”, ,”create”, “;”)

TRUEWrites the content of the range A2:C3 to the fiel located at “{rootDirectory}/file.csv” using “;” as separator and replacing an already existing file with the same name. The resulting content of the file is:
Example1;Example2;Example3
Example4;Example5;Example6