Skip to main content

Insert DataTable In Document

AutomatR.Word.Activities.InsertDataTableInDocument

The "Insert DataTable In Document" activity in AutomatR enables you to insert a table, generated from a DataTable variable, into a Word document at a specific position relative to text or a bookmark. This activity provides flexibility in adding structured data to your Word documents.

Properties

NameDescription
Input
Data TableSpecifies the DataTable variable containing extracted data from other inbound activities. DataTable variables storing data to be inserted into the Word document.
Insert Relative ToSpecifies whether the data table should be inserted relative to the entire document or a specific piece of text. Options: "Document," "Text."
PositionSpecifies the position where the data table needs to be inserted. Options: "Start," "End" (if inserting relative to the entire document), "Before," "After," "Replace" (if inserting relative to text).
Text OccurrenceSpecifies the occurrences of the specified text relative to which to add the data table. Options: "First," "Last," "Specific," "All."
Text to Search ForSpecifies the text that needs to be searched in the document, and the data table needs to be inserted according to the specified position. String variables containing the search text.
Index PositionSpecifies the index position when Text Occurrence is set to "Specific." Integer variables containing the index position.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. Enhances clarity and organization within the automation project. String variables containing the desired display name.
Optional
DelaySpecifies the amount of time (in seconds) to wait before executing the "Insert DataTable In Document" activity. Useful for handling synchronization issues. Integer variables containing the delay duration. Example: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1.

How to use:

  1. Drag and drop the "Insert DataTable In Document" activity onto the workflow.
  2. Configure the properties by specifying the DataTable variable, insertion options, search text, and position.
  3. Optionally, configure the delay and customize the display name.
  4. Execute the workflow to insert the specified data table into the Word document.

Example:

Consider an example where the "Insert DataTable In Document" activity is used to add a table containing sales data to a Word document:

Insert DataTable In Document:
Display Name: "Insert Sales Data"
Data Table: salesDataTable
Insert Relative To: "Document"
Position: "End"

In this example, the activity inserts the "salesDataTable" into the Word document at the end.