Activities
latest
false
Productivity Activities
Last updated Jul 9, 2024

Read CSV

UiPath.CSV.Activities.ReadCsvFile

Description

Copies all entries from a specified CSV file to an Excel range, table, or sheet, or saves the data for later use in your automation.

Project compatibility

Windows - Legacy | Windows | Cross-platform

Cross-platform configuration

In the body of the activity
  • Read from resource file - Click Plus on the right side of the field to toggle between using a local path or a Resource file. We recommend using relative folder paths to accommodate the file structure variations between Windows and Linux during project execution. For example, newFolder or otherFolder.
  • Output to - Represents the output DataTable that contains the information obtained from the CSV file.

  • Has headers - If enabled, it indicates that the first row in the CSV file is a header row. If not selected, a header row is added. This option is selected by default.

Properties

Options

  • Delimiter - Select the delimiter used in the CSV file: TabComma(','), Semicolon(';'), Caret('^'), or Pipe('|').
  • Encoding - Select the encoding type to be used. You can find the complete list of codes for each character encoding here. If no encoding type is specified, the activity will search for the file's Byte Order Marks to detect the encoding. If no Byte Order Marks are detected, the system ANSI code page is selected by default.
  • IgnoreQuotes - Specifies if quotes should be ignored when reading the file.

Windows - Legacy, Windows configuration

In the body of the activity
  • Read from file - Click the folder icon next to the field, and then browse to and select the CSV file to copy the data from. Alternatively, you can click the Plus icon on the right side of the field and then, from the menu, choose one of the available options to indicate the path of the file:

    • If the activity is inside a For Each File in Folder activity, you can select CurrentFile > Full Path to indicate the path of the file you are currently iterating through.
    • Data from the Project Notebook, a parent Excel file or Outlook account. For example, you can select a cell that contains a file path.
    • Text - Enter a file path in the Text Builder. You can combine text with a formula from an Excel file cell, for example to add a date to the file name using formulas in the Project Notebook.
    • Ask when run - Prompt for a file path when the project is executed.
    • Open in Advanced Editor - Enter a VB expression.
  • Output to - Click the Plus icon on the right side of the field and then, from the menu, select what to do with the copied data:

    • Select a parent Excel file and then a range, table, or sheet, or indicate a range in Excel where to copy the data.
    • Save for Later Use - Save the output data for later use in your project as input for another activity.
    • Open in Advanced Editor - Enter a VB expression.
  • Has headers - If selected, it indicates that the first row in the CSV file is a header row. If not selected, a header row is added. This option is selected by default.
Properties Panel

Common

  • DisplayName - The name displayed for the activity in the Designer panel.

File

  • FilePath - See Read from file in the body of the activity.

Misc

  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.

Options

  • Delimiter - Select the delimiter used in the CSV file: TabComma(','), Semicolon(';'), Caret('^'), or Pipe('|').
  • Encoding - Select the encoding type to be used. You can find the complete list of codes for each character encoding here. If no encoding type is specified, the activity will search for the file's Byte Order Marks to detect the encoding. If no Byte Order Marks are detected, the system ANSI code page is selected by default.
  • Has headers - See Has headers in the body of the activity.
  • IgnoreQuotes - Specifies if quotes should be ignored when reading the file.

Output

  • DataTable - See Output to in the body of the activity.

Examples of Using the Read CSV Activity

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.