activities
latest
false
UiPath logo, featuring letters U and I in white
Productivity Activities
Last updated Nov 6, 2024

Insert DataTable in Document

UiPath.Word.Activities.WordInsertDataTable

Description

Inserts a table generated from a DataTable variable in a Word document at a specified position relative to a text or bookmark. This activity must be added inside a Use Word File activity.

To learn how to use this activity, see Tutorial: Working with Word Automation.

Configuring the Activity

In the Body of the Activity
  • Table to insert - Click Plus docs image next to the field, select the Project Notebook or a parent Excel file, and then a range, table, or sheet to insert in the Word document, or click Indicate in Excel to select a range directly from the file. Alternatively, you can select a data table value that you previously saved for later use in the project. or Open in Advanced Editor and enter a VB expression.

To Insert the Table at the Start or at the End of the Document

  • Insert relative to - Select Document.
  • Position where to insert - Select the position in the document where to insert the table: at the Start or at the End of the document.

To Insert the Table Relative to a Specific Bookmark in the Document

  • Insert relative to - Select Bookmark.
  • Bookmark to search for - Click Plus  on the right side of the field, and then, from the menu, select Text to enter the name of the bookmark relative to which to add the table in the Text Builder. Alternatively, choose one of the other available options in menu to indicate the bookmark name:

    • Data from the Project Notebook, a parent Excel file or Outlook account. For example, select an Excel file and then select a cell that contains the bookmark name, or indicate a field from a selected email in Outlook that contains the name.
    • Use Saved Value - Select a value that you previously saved for later use in the project.
    • Ask when run - Prompt for the bookmark name when the project is executed.
    • Open in Advanced Editor - Enter a VB expression.

      Note: The Bookmark to search for value cannot be longer than 40 characters.
  • Text occurrence - Select All to insert the table relative to every occurrence of the bookmark name.
  • Position where to insert - Select the position where to insert the table: BeforeAfter, or in place of (Replace) the specified bookmark.

To Insert the Table Relative to a Specific Text in the Document

  • Insert relative to - Select Text.
  • Text to search for - Click Plus  on the right side of the field, and then, from the menu, select Text to enter the text relative to which to add the table in the Text Builder. Alternatively, choose one of the other available options in menu to indicate the text:

    • Data from the Project Notebook, a parent Excel file or Outlook account. For example, select an Excel file and then select a cell that contains the text to add, or indicate a field from a selected email in Outlook that contains the text.
    • Use Saved Value - Select a value that you previously saved for later use in the project.
    • Ask when run - Prompt for the text to add when the project is executed.
    • Open in Advanced Editor - Enter a VB expression.

      Note: The Text to search for value cannot be longer than 256 characters.
  • Text occurrence - Select the occurrences of the specified text relative to which to insert the table:

    • All - Insert the table relative to every occurrence of the text.
    • First - Insert the table relative to the first occurrence of the text.
    • Last - Insert the table relative to the last occurrence of the text.
    • Specific - Insert the table relative to a specific occurrence of the text. To indicate the occurrence, select Plus docs image next to the Occurrence index field, and then select Number. For example, if the text to search for appears five times in the document and you want to insert the table after the second occurrence of the text, the Occurrence index should be set to 2.
  • Position where to insert - Select the position where to insert the table: BeforeAfter, or in place of (Replace) the specified text.
Properties Panel

Common

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

Input

  • DataTable - See Table to insert in the body of the activity.

Insert Options

  • Bookmark - See Bookmark to search for in the body of the activity.
  • Occurrence - See Text occurrence in the body of the activity.
  • OccurrenceIndex - See Text occurrence > Specific in the body of the activity.
  • Position - See Position to insert in the body of the activity.
  • Text - See Text to search for in the body of the activity.

Misc

  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
  • Description
  • Configuring the 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.