UiPath Activities

Generate Data Table

UiPath.Core.Activities.GenerateDataTable

Generates a DataTable variable from unstructured data. This activity enables you to select column and row separators according to which the table is generated. This activity is automatically generated when using the Generate Table feature in the Screen Scraping window.

Properties

Input

  • Input - Specifies the source of the unstructured data that is to be converted into a table. This field supports only String variables.
  • Positions - If OCR is used for scraping, and the Get Words Info check box is selected, this field contains the IEnumerable<KeyValuePair<Rectangle,String>> variable that has the WordsInfo value.

Fixed Formatting Options

  • ColumnSizes - Specifies the size of the columns that are to be created in the table. This field supports only IEnumerable<Int32> variables.

Formatting Options

  • ColumnSeparators - Specifies the character that is to be used as a column separator. This field supports only String variables.
  • NewLineSeparator - Specifies the character that is to be used as a newline separator. This field supports only String variables.

Common

  • DisplayName - The display name of the activity.
  • ContinueOnError - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.

Note:

If this activity is included in Try Catch and the value of the ContinueOnError property is True, no error is caught when the project is executed.

Output

  • DataTable - The DataTable variable that contains the generated table.

Table Options

  • AutoDetectTypes - When selected, automatically detects the column or row type, whether it is String, Int32, etc.
  • UseColumnHeader - If selected, uses the first identified column as the column header.
  • UseRowHeader - If selected, uses the first identified row as the row header.

Misc

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

Example of Using the Generate Data Table Activity

This example explains how to generate a table with specific information by using the Generate Data Table activity.

This is how the automation process can be built:

  1. Open Studio and create a new Process.
  2. Drag a Sequence container in the Workflow Designer.
    • Create the following variables:
Variable Name
Variable Type
Default Value

DT1

DataTable

-

Result

String

-

Name

GenericValue

-

  1. Drag a Generate Data Table activity inside the Sequence container.
    • In the Properties panel, add the value False in the CSVParsing field.
    • Add the value Environment.NewLine in the NewLineSeparator field.
    • Add the expression "Name Surname Grade John Doe 10 James Liam 7 Robert Smith 9" in the Input field.
    • Add the variable DT1 in the DataTable field.
    • Select the check box for the UseColumnHeader option.
  2. Click the Generate DataTable button for opening the Generate Data Table option.
    • Select the check box for the Use First Row as Column Headers field.
    • Select the space option from the Column Separators drop-down list.
    • Select the newline option from the NewLine Separators drop-down list.
    • Click OK for closing the wizard.
    • This is how the Generate Data Table Wizard panel should look:
  1. Drag an Output Data Table activity below the Generate Data Table activity.
    • In the Properties panel, add the variable DT1 in the DataTable field.
    • Add the variable Result in the Text field.
  2. Place a Write Line activity under the Output Data Table activity.
    • Add the variable Result in the Text field.
  3. Run the process. The robot generates a table by using the input data.

Updated 3 months ago


Generate Data Table


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.