Skip to content

Write Dataset to Text File Activity

The Write Dataset to Text File activity enables users to persist dataset changes to a specified text file. It ensures that all operations performed on a dataset are accurately reflected and saved, providing a reliable method for data output.

Field Description Requirement
Text Name Specifies the reference name of the text file where the dataset content will be written. This file must have been previously opened or created within the workflow. Required
Dataset Name Specifies the reference name of the dataset whose content will be written to the text file. This dataset must have been previously created or loaded within the workflow. Required
Append Determines how data is written to the file. If true, the dataset content is added to the end of the existing file content. If false and the file contains data, the existing content is overwritten before the new data is written. If the file is empty, the data is written directly. Optional

Action Types & Examples

Text Name Reference

  • Format: string
  • Example Result: "outputFile"

Dataset Name Reference

  • Format: string
  • Example Result: "customerRecords"

Append Mode

  • Format: boolean
  • Example Result: true

Implementation Examples

Field Setup - Text Name: newText - Dataset Name: newDS - Append: true

Execution Parameters - textFileName = "report.txt" - datasetReference = "finalData" - appendMode = false

Technical Notes

  • The activity requires write permissions to the specified file path. Ensure the RPA bot has the necessary access rights to the target directory.
  • If the specified text file does not exist, the activity will attempt to create it. If it cannot be created due to permissions or an invalid path, an error will occur.
  • The dataset content is typically written as plain text. The exact serialization format (e.g., comma-separated values, line-by-line) depends on the internal structure of the dataset and how the RPA platform handles its conversion to text.
  • Consider the file encoding if dealing with non-ASCII characters. The default system encoding will be used unless explicitly configured elsewhere in the workflow.