writeToFile
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: <file path>;<Sheetname>(Optional);<Content to write>;<Newline>
Supported file formats: .txt, .xls/.xlsx, .XML/JSON
<File path>
(Required)
Provide file path where the content should be written.
<Sheet name> (Optional)
Specify the Excel sheet name where the content should be written.
<Content to write> (Required)
Provide text or string that needs to be write into the file.
<Newline> (Required)
Provide the text as Newline to move the cursor to a new line before writing the text
Output Value:
<Dynamic Variable>(Optional);<Dynamic Variable>(Optional)
This variable stores the status as true or false
Example 1
Write content to a specified text file The writeToFile 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 content is not written


Example 2
Write content to a specified sheet in a Excel file The writeToFile 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;Newline). 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 content is not written


Last updated
Was this helpful?