UiPath Activities Guide

Insert DataTable

UiPath.Word.Activities.WordInsertDataTable

Inserts a table generated from a DataTable variable in a Word document. The table is created at a position relative to a specified text or bookmark. This activity can only be used within a Word Application Scope activity.

Properties

Common

  • DisplayName - The display name of the activity.

Input

  • DataTable - The DataTable variable you want to create the table from. This field supports only DataTable variables.

Insert Options

  • Bookmark - The name of the bookmark which specifies the position where you want to insert the table. This field supports only strings and String variables.

Important!

The value inserted in the Bookmark field cannot be longer than 40 characters.

  • Occurrence - Specifies which occurrence of the target element to be used as the position for the table. The following options are available: All - the table is inserted at each occurrence of the element, First - the table is inserted at the first occurrence of the element, Last - the table is inserted at the last occurrence of the element, Specific - the table is inserted at the occurrence of the element specified in the OccurrenceIndex property.
  • OccurrenceIndex - Specifies the occurrence of the target element where you want to insert the table as an Int32 variable. This property field is taken into account only if the Occurrence property is set to Specific. This field supports only Int32 variables.
  • Position - Specifies the position relative to the target element where you want to insert the table. The following options are available: Start - at the start of the document, End - at the end of the document, Before - before the target element, After - after the target element, Replace - the target element is replaced with the table.
  • Text - The text which specifies the position where you want to insert the table. This field supports only strings and String variables.

Important!

The value inserted in the Text field cannot be longer than 256 characters.

Misc

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

Example of Using the Insert DataTable Activity

To exemplify how to use this activity, we have built an automation project which offers three different cases in which you can use this activity:

  1. The table is retrieved from a Build Datatable activity and inserted at the beginning of the document
  2. The table is retrieved from an Excel workbook and inserted after the first occurrence of a specified text.
  3. The table is retrieved from a Build Datatable activity and replaces the third occurence of a specific text.

You can download the workflow here.


Insert DataTable


Suggested Edits are limited on API Reference Pages

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