阅读和查看 Automation Anywhere 文档

Automation Anywhere Version 11.3

关闭内容

内容

打开内容

Reading variables from an external file

  • 已更新:2020/05/06
    • 11.3.x
    • 探索
    • Enterprise

Reading variables from an external file

Automation Anywhere provides you an option to set the values of variables using an external file such as CSV, Excel, text, and database, which can be used if you do not want to specify the value of a variable while creating it.

Reading from a Text File

To read variable values from a text file, follow these steps:

  1. In the Variable Manager, click the Add button at bottom or right-click on an existing variable and select Add to invoke the Add Variable check box.

    In the Add Variable window, the Create New Variable option is enabled by default.

  2. Select the desired variable type, enter a name, and select Read from Text File from the drop-down menu.

  3. To ensure that Automation Anywhere validates the text files correctly when assigning values for the variables, follow these guidelines:
    • One text file can have multiple<variable> = <value>pairs, on separate lines (line returns using the ENTER key).
    • For value type variables, only one value should be assigned.
    • Example:myvar=value1wheremyvaris the name of the variable.
    • Example:my-list-var= value1,value2,value3
    • Ensure that your text file is specified in the Variable Manager before the task runs.
    • For List type variables, you can define the comma-separated values for the variable.
    • Variable names are not case-sensitive.
    For example, here is a text file with different <variable>=<value> pairs:
    Age=12,13,16,21
    Games=Football,Soccer,Rugby
    username=my-username
    Removed the password field.

Reading from an Excel file

When you create an array variable and specify that values should be read from an Excel file, data can be read for the following:

  • For an entire row
  • For an entire column
  • For a range of cells that you specify using the From and To fields

Reading from a database

To read values from a database file, you must specify a connection string and a SELECT query.

Note: Reading variable from database is applicable only for array type variables.
发送反馈