活动
最新
False
横幅背景图像
生产力活动
上次更新日期 2024年4月26日

读取 CSV

UiPath.CSV.Activities.ReadCsvFile

描述

将指定 CSV 文件中的所有条目复制到 Excel 范围、表格或工作表中,或者保存数据以供日后在自动化中使用。

项目兼容性

Windows - 旧版 | Windows | 跨平台

跨平台配置

在活动正文中
  • 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.

属性

选项

  • “分隔符”- 选择在 CSV 文件中使用的分隔符:“制表符”、“逗号”(',')、“分号”(';')、“插入符号”('^') 或“竖线”('|')。
  • 编码 ” - 选择要使用的编码类型。 您可以在 此处找到每种字符编码的完整代码列表。 如果未指定编码类型,活动将搜索文件的字节顺序标记以检测编码。 如果未检测到任何字节顺序标记,则默认选择系统 ANSI 代码页。
  • IgnoreQuotes - 指定在读取文件时是否应忽略引号。

Windows - 旧版 Windows 配置

在活动正文中
  • 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.
    • 项目笔记本、父级 Excel 文件或 Outlook 帐户中的数据。例如,您可以选择包含文件路径的单元格。
    • “文本”- 在文本生成器中输入文件路径。您可以将文本与 Excel 文件单元格中的公式结合使用,例如,使用“项目笔记本”中的公式为文件名添加日期。
    • “运行时询问”- 执行项目时提示输入文件路径。
    • “在高级编辑器中打开”- 输入 VB 表达式。
  • 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:

    • 选择父级 Excel 文件,然后选择范围、表格或工作表,或指定 Excel 中要将数据复制到其中的范围。
    • Save for Later Use - Save the output data for later use in your project as input for another activity.
    • “在高级编辑器中打开”- 输入 VB 表达式。
  • 含标头 - 如果选中,则表示 CSV 文件中的第一行是标头行。如果未选中,则系统会添加标头行。默认情况下选中此选项。
属性面板

常见

  • “显示名称 ” - 在“设计器”面板中为活动显示的名称。

文件

  • 文件路径 - 请在活动主体中查看 读取文件 。

其他

  • “私有”- 选中后将不再以“Verbose”级别记录变量和参数的值。

选项

  • “分隔符”- 选择在 CSV 文件中使用的分隔符:“制表符”、“逗号”(',')、“分号”(';')、“插入符号”('^') 或“竖线”('|')。
  • 编码 ” - 选择要使用的编码类型。 您可以在 此处找到每种字符编码的完整代码列表。 如果未指定编码类型,活动将搜索文件的字节顺序标记以检测编码。 如果未检测到任何字节顺序标记,则默认选择系统 ANSI 代码页。
  • 有标题 - 在活动主体中查看 有标题 。
  • IgnoreQuotes - 指定在读取文件时是否应忽略引号。

输出

  • 数据表- 请在活动主体中查看 输出位置 。

“读取 CSV”活动使用示例

此页面是否有帮助?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath 白色徽标
信任与安全
© 2005-2024 UiPath. All rights reserved.