The CSV/TXT package contains actions that enable you to open a CSV or text file, read data from that file, and assign the data to a Table variable. This package supports files encoded in ANSI, Unicode, UTF-8, or Windows-1251, and can process up to one million records.
Package actions
Perform the following actions within the CSV/TXT package as part of using the available actions:
- Open the file to be used in the automation. See Open action for CSV/TXT file.
Open action supports file streaming.Note: For files containing large data sets, use actions from the Database package to automate create, read, and update operations. See Using Connect action for database.
- Use the Read action to retrieve values from a CSV or TXT file
and store them in a Table variable. See Using Read action.
To retrieve values row by row, use the For each row in CSV/TXT iterator in the Loop action to read values from each row in the file and assign them to a record variable. See Using the For each row in CSV/TXT iterator.
Note: The Read action and For each row in CSV/TXT iterator only support CSV/TXT files that conform to the RFC 4180 standard. For more information about the standard, see Common format and MIME type for CSV files. - After completing the CSV/TXT tasks, close the file using the Close action. Enter the session name used to open the file with the Open action.