Write to File

This pre-built Action located under the @Generic Element, instructs Avo Assure to write given content in the file whose file path is provided in Input Value and save the result in dynamic variable.

Syntax

Input Value:

For Text file: <file path>;<content to write>;<Newline>(Optional)

Argument
Description

<file path>

(Required)

Provide file path to the file where the content should be written.

<content to write> (Required)

Provide text or string that you want to write into the file.

<Newline> (Optional)

Optional parameter to decide if the content should be written in a new line.

XML/JSON File: <file path>;<content to write>

Argument
Description

<file path>

(Required)

Provide file path to the file where the content should be written.

<content to write> (Required)

Provide text or string that you want to write into the file.

For Excel file: <file path>;<Sheetname>(Optional);<content to write>;<Newline>(Required)

Argument
Description

<file path>

(Required)

Provide file path to the file where the content should be written.

<Sheetname> (Optional)

Specifies which sheet to write into.

<content to write> (Required)

Provide text or string that you want to write into the file.

<Newline> (Required)

Optional parameter to decide if the content should be written on a new line.

Output Value:

Argument
Description

<Dynamic Variable>(Optional);<Dynamic Variable>(Optional)

This variable stores the status as true or false

Example 1

Write content to a specified file The Write to File action writes the specified content to the file path provided in the Input Value column (e.g., C:\sam\sample.txt;New order is preparing). The file is updated with the new content. The action status is saved in the {Status} variable with the following possible values:

  • True if the content is written to the file successfully

  • False – if the contet is not written

Example 2

Write content to a specified sheet in a file The Write to File action writes the specified content to the given sheet in the file path provided in the Input Value column (e.g., ‪C:\sam\OR ID.xlsx;Sheet2;ORD10005). The action status is saved in the {Status} variable with the following possible values:

  • True if the content is written to the specified sheet successfully

  • False – if the contet is not written

Last updated

Was this helpful?